[{"data":1,"prerenderedAt":3475},["ShallowReactive",2],{"navigation_docs":3,"-modules-communication-push":732,"-modules-communication-push-surround":3470},[4,54,159,535,608,651],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":53},"Get Started","i-lucide-rocket","\u002Fget-started","1.get-started",[10,15,20,24,29,34,39,44,48],{"title":11,"path":12,"stem":13,"icon":14},"Introduction","\u002Fget-started\u002Fintroduction","1.get-started\u002F1.introduction","i-lucide-house",{"title":16,"path":17,"stem":18,"icon":19},"Installation","\u002Fget-started\u002Finstallation","1.get-started\u002F2.installation","i-lucide-download",{"title":21,"path":22,"stem":23},"Project Structure","\u002Fget-started\u002Fproject-structure","1.get-started\u002F3.project-structure",{"title":25,"path":26,"stem":27,"icon":28},"Configuration","\u002Fget-started\u002Fconfiguration","1.get-started\u002F4.configuration","i-lucide-settings",{"title":30,"path":31,"stem":32,"icon":33},"Authentication","\u002Fget-started\u002Fauthentication","1.get-started\u002F5.authentication","i-lucide-lock",{"title":35,"path":36,"stem":37,"icon":38},"Adding modules","\u002Fget-started\u002Fadding-modules","1.get-started\u002F6.adding-modules","i-lucide-puzzle",{"title":40,"path":41,"stem":42,"icon":43},"Database","\u002Fget-started\u002Fdatabase","1.get-started\u002F7.database","i-lucide-database",{"title":45,"path":46,"stem":47,"icon":6},"Deployment","\u002Fget-started\u002Fdeployment","1.get-started\u002F8.deployment",{"title":49,"path":50,"stem":51,"icon":52},"Upgrading","\u002Fget-started\u002Fupgrading","1.get-started\u002F9.upgrading","i-lucide-circle-arrow-up",false,{"title":55,"icon":56,"path":57,"stem":58,"children":59,"page":53},"Guide","i-lucide-book-open","\u002Fguide","2.guide",[60,94,119,129],{"title":61,"icon":53,"path":62,"stem":63,"children":64,"page":53},"Concepts","\u002Fguide\u002Fconcepts","2.guide\u002F1.concepts",[65,70,75,80,84,89],{"title":66,"path":67,"stem":68,"icon":69},"Architecture","\u002Fguide\u002Fconcepts\u002Farchitecture","2.guide\u002F1.concepts\u002F1.architecture","i-lucide-blocks",{"title":71,"path":72,"stem":73,"icon":74},"Access control","\u002Fguide\u002Fconcepts\u002Fauth-and-scopes","2.guide\u002F1.concepts\u002F2.auth-and-scopes","i-lucide-shield-check",{"title":76,"path":77,"stem":78,"icon":79},"Extension points","\u002Fguide\u002Fconcepts\u002Fextension-points","2.guide\u002F1.concepts\u002F3.extension-points","i-lucide-plug",{"title":81,"path":82,"stem":83,"icon":43},"Database extensions","\u002Fguide\u002Fconcepts\u002Fdatabase-extensions","2.guide\u002F1.concepts\u002F4.database-extensions",{"title":85,"path":86,"stem":87,"icon":88},"Identity","\u002Fguide\u002Fconcepts\u002Fidentity","2.guide\u002F1.concepts\u002F5.identity","i-lucide-fingerprint",{"title":90,"path":91,"stem":92,"icon":93},"Glossary","\u002Fguide\u002Fconcepts\u002Fglossary","2.guide\u002F1.concepts\u002F6.glossary","i-lucide-book-a",{"title":95,"icon":53,"path":96,"stem":97,"children":98,"page":53},"UX patterns","\u002Fguide\u002Fux-patterns","2.guide\u002F2.ux-patterns",[99,104,109,114],{"title":100,"path":101,"stem":102,"icon":103},"Layouts and navigation","\u002Fguide\u002Fux-patterns\u002Flayouts-and-navigation","2.guide\u002F2.ux-patterns\u002F1.layouts-and-navigation","i-lucide-layout-template",{"title":105,"path":106,"stem":107,"icon":108},"Pages","\u002Fguide\u002Fux-patterns\u002Fpages","2.guide\u002F2.ux-patterns\u002F2.pages","i-lucide-table",{"title":110,"path":111,"stem":112,"icon":113},"Forms and actions","\u002Fguide\u002Fux-patterns\u002Fforms-and-actions","2.guide\u002F2.ux-patterns\u002F3.forms-and-actions","i-lucide-square-pen",{"title":115,"path":116,"stem":117,"icon":118},"Text and formatting","\u002Fguide\u002Fux-patterns\u002Ftext-and-formatting","2.guide\u002F2.ux-patterns\u002F4.text-and-formatting","i-lucide-type",{"title":120,"icon":53,"path":121,"stem":122,"children":123,"page":53},"Best practices","\u002Fguide\u002Fbest-practices","2.guide\u002F3.best-practices",[124],{"title":125,"path":126,"stem":127,"icon":128},"HTTP routes","\u002Fguide\u002Fbest-practices\u002Fhttp-routes","2.guide\u002F3.best-practices\u002F1.http-routes","i-lucide-route",{"title":130,"icon":53,"path":131,"stem":132,"children":133,"page":53},"Going further","\u002Fguide\u002Fgoing-further","2.guide\u002F4.going-further",[134,139,144,149,154],{"title":135,"path":136,"stem":137,"icon":138},"Use your own OAuth server","\u002Fguide\u002Fgoing-further\u002Fown-oauth-server","2.guide\u002F4.going-further\u002F1.own-oauth-server","i-lucide-key-round",{"title":140,"path":141,"stem":142,"icon":143},"Create an OAuth application","\u002Fguide\u002Fgoing-further\u002Foauth-application","2.guide\u002F4.going-further\u002F2.oauth-application","i-lucide-app-window",{"title":145,"path":146,"stem":147,"icon":148},"Signing keys","\u002Fguide\u002Fgoing-further\u002Fsigning-keys","2.guide\u002F4.going-further\u002F3.signing-keys","i-lucide-key-square",{"title":150,"path":151,"stem":152,"icon":153},"Stripe setup","\u002Fguide\u002Fgoing-further\u002Fstripe-setup","2.guide\u002F4.going-further\u002F4.stripe-setup","i-lucide-credit-card",{"title":155,"path":156,"stem":157,"icon":158},"Migrate to the permission model","\u002Fguide\u002Fgoing-further\u002Fmigrate-access-control","2.guide\u002F4.going-further\u002F5.migrate-access-control","i-lucide-arrow-right-left",{"title":160,"icon":161,"path":162,"stem":163,"children":164},"Modules","i-lucide-boxes","\u002Fmodules","3.modules",[165,167,252,261,290,303,350,396,473,518],{"title":160,"path":162,"stem":166},"3.modules\u002Findex",{"title":85,"icon":53,"path":168,"stem":169,"children":170,"page":53},"\u002Fmodules\u002Fidentity","3.modules\u002F1.identity",[171,198,202,206,228,232,248],{"title":172,"path":173,"stem":174,"children":175},"Auth","\u002Fmodules\u002Fidentity\u002Fauth","3.modules\u002F1.identity\u002F1.auth\u002Findex",[176,178,182,186,190,194],{"title":177,"path":173,"stem":174},"Overview",{"title":179,"path":180,"stem":181},"Server API","\u002Fmodules\u002Fidentity\u002Fauth\u002Fserver","3.modules\u002F1.identity\u002F1.auth\u002F2.server",{"title":183,"path":184,"stem":185},"Reference","\u002Fmodules\u002Fidentity\u002Fauth\u002Freference","3.modules\u002F1.identity\u002F1.auth\u002F3.reference",{"title":187,"path":188,"stem":189},"Client mode","\u002Fmodules\u002Fidentity\u002Fauth\u002Fclient-mode","3.modules\u002F1.identity\u002F1.auth\u002F4.client-mode",{"title":191,"path":192,"stem":193},"OAuth providers","\u002Fmodules\u002Fidentity\u002Fauth\u002Foauth-providers","3.modules\u002F1.identity\u002F1.auth\u002F5.oauth-providers",{"title":195,"path":196,"stem":197},"Resource mode","\u002Fmodules\u002Fidentity\u002Fauth\u002Fresource-mode","3.modules\u002F1.identity\u002F1.auth\u002F6.resource-mode",{"title":199,"path":200,"stem":201},"Users","\u002Fmodules\u002Fidentity\u002Fusers","3.modules\u002F1.identity\u002F2.users",{"title":203,"path":204,"stem":205},"Account","\u002Fmodules\u002Fidentity\u002Faccount","3.modules\u002F1.identity\u002F3.account",{"title":207,"path":208,"stem":209,"children":210},"Authorization","\u002Fmodules\u002Fidentity\u002Fauthorization","3.modules\u002F1.identity\u002F4.authorization\u002Findex",[211,212,216,220,224],{"title":177,"path":208,"stem":209},{"title":213,"path":214,"stem":215},"Roles and requirements","\u002Fmodules\u002Fidentity\u002Fauthorization\u002Froles-and-requirements","3.modules\u002F1.identity\u002F4.authorization\u002F2.roles-and-requirements",{"title":217,"path":218,"stem":219},"Policies","\u002Fmodules\u002Fidentity\u002Fauthorization\u002Fpolicies","3.modules\u002F1.identity\u002F4.authorization\u002F3.policies",{"title":221,"path":222,"stem":223},"Client","\u002Fmodules\u002Fidentity\u002Fauthorization\u002Fclient","3.modules\u002F1.identity\u002F4.authorization\u002F4.client",{"title":225,"path":226,"stem":227},"Admin","\u002Fmodules\u002Fidentity\u002Fauthorization\u002Fadmin","3.modules\u002F1.identity\u002F4.authorization\u002F5.admin",{"title":229,"path":230,"stem":231},"Preferences","\u002Fmodules\u002Fidentity\u002Fpreferences","3.modules\u002F1.identity\u002F5.preferences",{"title":233,"path":234,"stem":235,"children":236},"OAuth Server","\u002Fmodules\u002Fidentity\u002Foauth-server","3.modules\u002F1.identity\u002F6.oauth-server\u002Findex",[237,238,241,245],{"title":177,"path":234,"stem":235},{"title":179,"path":239,"stem":240},"\u002Fmodules\u002Fidentity\u002Foauth-server\u002Fserver","3.modules\u002F1.identity\u002F6.oauth-server\u002F2.server",{"title":242,"path":243,"stem":244},"Hooks","\u002Fmodules\u002Fidentity\u002Foauth-server\u002Fhooks","3.modules\u002F1.identity\u002F6.oauth-server\u002F3.hooks",{"title":183,"path":246,"stem":247},"\u002Fmodules\u002Fidentity\u002Foauth-server\u002Froutes-and-clients","3.modules\u002F1.identity\u002F6.oauth-server\u002F4.routes-and-clients",{"title":249,"path":250,"stem":251},"OAuth Resource","\u002Fmodules\u002Fidentity\u002Foauth-resource","3.modules\u002F1.identity\u002F8.oauth-resource",{"title":253,"icon":53,"path":254,"stem":255,"children":256,"page":53},"Organisation","\u002Fmodules\u002Forganisation","3.modules\u002F2.organisation",[257],{"title":258,"path":259,"stem":260},"Teams","\u002Fmodules\u002Forganisation\u002Fteams","3.modules\u002F2.organisation\u002F1.teams",{"title":262,"icon":53,"path":263,"stem":264,"children":265,"page":53},"Commerce","\u002Fmodules\u002Fcommerce","3.modules\u002F3.commerce",[266,270,274],{"title":267,"path":268,"stem":269},"Stripe","\u002Fmodules\u002Fcommerce\u002Fstripe","3.modules\u002F3.commerce\u002F1.stripe",{"title":271,"path":272,"stem":273},"Payments","\u002Fmodules\u002Fcommerce\u002Fpayments","3.modules\u002F3.commerce\u002F2.payments",{"title":275,"path":276,"stem":277,"children":278},"Subscriptions","\u002Fmodules\u002Fcommerce\u002Fsubscriptions","3.modules\u002F3.commerce\u002F3.subscriptions\u002Findex",[279,280,283,287],{"title":177,"path":276,"stem":277},{"title":179,"path":281,"stem":282},"\u002Fmodules\u002Fcommerce\u002Fsubscriptions\u002Fserver","3.modules\u002F3.commerce\u002F3.subscriptions\u002F2.server",{"title":284,"path":285,"stem":286},"App","\u002Fmodules\u002Fcommerce\u002Fsubscriptions\u002Fapp","3.modules\u002F3.commerce\u002F3.subscriptions\u002F3.app",{"title":183,"path":288,"stem":289},"\u002Fmodules\u002Fcommerce\u002Fsubscriptions\u002Freference","3.modules\u002F3.commerce\u002F3.subscriptions\u002F4.reference",{"title":291,"icon":53,"path":292,"stem":293,"children":294,"page":53},"Content","\u002Fmodules\u002Fcontent","3.modules\u002F4.content",[295,299],{"title":296,"path":297,"stem":298},"Help center","\u002Fmodules\u002Fcontent\u002Fhelp-center","3.modules\u002F4.content\u002F2.help-center",{"title":300,"path":301,"stem":302},"Documents","\u002Fmodules\u002Fcontent\u002Fdocuments","3.modules\u002F4.content\u002F3.documents",{"title":304,"icon":53,"path":305,"stem":306,"children":307,"page":53},"Features","\u002Fmodules\u002Ffeatures","3.modules\u002F5.features",[308,323,342,346],{"title":309,"path":310,"stem":311,"children":312},"Events","\u002Fmodules\u002Ffeatures\u002Fevents","3.modules\u002F5.features\u002F1.events\u002Findex",[313,314,317,320],{"title":177,"path":310,"stem":311},{"title":179,"path":315,"stem":316},"\u002Fmodules\u002Ffeatures\u002Fevents\u002Fserver","3.modules\u002F5.features\u002F1.events\u002F2.server",{"title":284,"path":318,"stem":319},"\u002Fmodules\u002Ffeatures\u002Fevents\u002Fapp","3.modules\u002F5.features\u002F1.events\u002F3.app",{"title":183,"path":321,"stem":322},"\u002Fmodules\u002Ffeatures\u002Fevents\u002Freference","3.modules\u002F5.features\u002F1.events\u002F4.reference",{"title":324,"path":325,"stem":326,"children":327},"Forms","\u002Fmodules\u002Ffeatures\u002Fforms","3.modules\u002F5.features\u002F2.forms\u002Findex",[328,329,333,336,339],{"title":177,"path":325,"stem":326},{"title":330,"path":331,"stem":332},"Definition","\u002Fmodules\u002Ffeatures\u002Fforms\u002Fdefinition","3.modules\u002F5.features\u002F2.forms\u002F2.definition",{"title":179,"path":334,"stem":335},"\u002Fmodules\u002Ffeatures\u002Fforms\u002Fserver","3.modules\u002F5.features\u002F2.forms\u002F3.server",{"title":284,"path":337,"stem":338},"\u002Fmodules\u002Ffeatures\u002Fforms\u002Fapp","3.modules\u002F5.features\u002F2.forms\u002F4.app",{"title":183,"path":340,"stem":341},"\u002Fmodules\u002Ffeatures\u002Fforms\u002Freference","3.modules\u002F5.features\u002F2.forms\u002F5.reference",{"title":343,"path":344,"stem":345},"Cookie Consent","\u002Fmodules\u002Ffeatures\u002Fcookie-consent","3.modules\u002F5.features\u002F3.cookie-consent",{"title":347,"path":348,"stem":349},"MCP","\u002Fmodules\u002Ffeatures\u002Fmcp","3.modules\u002F5.features\u002F4.mcp",{"title":351,"icon":53,"path":352,"stem":353,"children":354,"page":53},"Communication","\u002Fmodules\u002Fcommunication","3.modules\u002F6.communication",[355,359,376,380,384,388,392],{"title":356,"path":357,"stem":358},"Notify","\u002Fmodules\u002Fcommunication\u002Fnotify","3.modules\u002F6.communication\u002F1.notify",{"title":360,"path":361,"stem":362,"children":363},"Email Templates","\u002Fmodules\u002Fcommunication\u002Femail-templates","3.modules\u002F6.communication\u002F2.email-templates\u002Findex",[364,365,369,372],{"title":177,"path":361,"stem":362},{"title":366,"path":367,"stem":368},"Email components","\u002Fmodules\u002Fcommunication\u002Femail-templates\u002Fcomponents","3.modules\u002F6.communication\u002F2.email-templates\u002F2.components",{"title":179,"path":370,"stem":371},"\u002Fmodules\u002Fcommunication\u002Femail-templates\u002Fserver","3.modules\u002F6.communication\u002F2.email-templates\u002F3.server",{"title":373,"path":374,"stem":375},"Module emails","\u002Fmodules\u002Fcommunication\u002Femail-templates\u002Fmodule-emails","3.modules\u002F6.communication\u002F2.email-templates\u002F4.module-emails",{"title":377,"path":378,"stem":379},"Push","\u002Fmodules\u002Fcommunication\u002Fpush","3.modules\u002F6.communication\u002F3.push",{"title":381,"path":382,"stem":383},"Inbox","\u002Fmodules\u002Fcommunication\u002Finbox","3.modules\u002F6.communication\u002F4.inbox",{"title":385,"path":386,"stem":387},"Short links","\u002Fmodules\u002Fcommunication\u002Fshort-links","3.modules\u002F6.communication\u002F5.short-links",{"title":389,"path":390,"stem":391},"Campaigns","\u002Fmodules\u002Fcommunication\u002Fcampaigns","3.modules\u002F6.communication\u002F6.campaigns",{"title":393,"path":394,"stem":395},"SMS","\u002Fmodules\u002Fcommunication\u002Fsms","3.modules\u002F6.communication\u002F7.sms",{"title":397,"icon":53,"path":398,"stem":399,"children":400,"page":53},"Interface","\u002Fmodules\u002Finterface","3.modules\u002F7.interface",[401,426,429,433,437,451,455,469],{"title":402,"path":403,"stem":404,"children":405},"UI","\u002Fmodules\u002Finterface\u002Fui","3.modules\u002F7.interface\u002F1.ui\u002Findex",[406,407,411,415,419,423],{"title":177,"path":403,"stem":404},{"title":408,"path":409,"stem":410},"Page components","\u002Fmodules\u002Finterface\u002Fui\u002Fpage-components","3.modules\u002F7.interface\u002F1.ui\u002F2.page-components",{"title":412,"path":413,"stem":414},"App shell","\u002Fmodules\u002Finterface\u002Fui\u002Fapp-shell","3.modules\u002F7.interface\u002F1.ui\u002F3.app-shell",{"title":416,"path":417,"stem":418},"Form inputs","\u002Fmodules\u002Finterface\u002Fui\u002Fform-inputs","3.modules\u002F7.interface\u002F1.ui\u002F4.form-inputs",{"title":420,"path":421,"stem":422},"Composables and helpers","\u002Fmodules\u002Finterface\u002Fui\u002Fcomposables","3.modules\u002F7.interface\u002F1.ui\u002F5.composables",{"title":183,"path":424,"stem":425},"\u002Fmodules\u002Finterface\u002Fui\u002Freference","3.modules\u002F7.interface\u002F1.ui\u002F6.reference",{"title":225,"path":427,"stem":428},"\u002Fmodules\u002Finterface\u002Fadmin","3.modules\u002F7.interface\u002F2.admin",{"title":430,"path":431,"stem":432},"Menu","\u002Fmodules\u002Finterface\u002Fmenu","3.modules\u002F7.interface\u002F3.menu",{"title":434,"path":435,"stem":436},"Widget","\u002Fmodules\u002Finterface\u002Fwidget","3.modules\u002F7.interface\u002F4.widget",{"title":438,"path":439,"stem":440,"children":441},"Mobile","\u002Fmodules\u002Finterface\u002Fmobile","3.modules\u002F7.interface\u002F5.mobile\u002Findex",[442,443,447],{"title":177,"path":439,"stem":440},{"title":444,"path":445,"stem":446},"CLI and devices","\u002Fmodules\u002Finterface\u002Fmobile\u002Fcli-and-devices","3.modules\u002F7.interface\u002F5.mobile\u002F2.cli-and-devices",{"title":448,"path":449,"stem":450},"Splash screen","\u002Fmodules\u002Finterface\u002Fmobile\u002Fsplash-screen","3.modules\u002F7.interface\u002F5.mobile\u002F3.splash-screen",{"title":452,"path":453,"stem":454},"Dashboard","\u002Fmodules\u002Finterface\u002Fdashboard","3.modules\u002F7.interface\u002F6.dashboard",{"title":456,"path":457,"stem":458,"children":459},"Desktop","\u002Fmodules\u002Finterface\u002Fdesktop","3.modules\u002F7.interface\u002F7.desktop\u002Findex",[460,461,465],{"title":177,"path":457,"stem":458},{"title":462,"path":463,"stem":464},"CLI","\u002Fmodules\u002Finterface\u002Fdesktop\u002Fcli","3.modules\u002F7.interface\u002F7.desktop\u002F2.cli",{"title":466,"path":467,"stem":468},"Local mode","\u002Fmodules\u002Finterface\u002Fdesktop\u002Flocal-mode","3.modules\u002F7.interface\u002F7.desktop\u002F3.local-mode",{"title":470,"path":471,"stem":472},"Maps","\u002Fmodules\u002Finterface\u002Fmaps","3.modules\u002F7.interface\u002F8.maps",{"title":474,"icon":53,"path":475,"stem":476,"children":477,"page":53},"Platform","\u002Fmodules\u002Fplatform","3.modules\u002F8.platform",[478,500],{"title":479,"path":480,"stem":481,"children":482},"Module Kit","\u002Fmodules\u002Fplatform\u002Fmodule-kit","3.modules\u002F8.platform\u002F1.module-kit\u002Findex",[483,484,488,492,496],{"title":177,"path":480,"stem":481},{"title":485,"path":486,"stem":487},"Server toolkit","\u002Fmodules\u002Fplatform\u002Fmodule-kit\u002Fserver-toolkit","3.modules\u002F8.platform\u002F1.module-kit\u002F2.server-toolkit",{"title":489,"path":490,"stem":491},"Registries and menus","\u002Fmodules\u002Fplatform\u002Fmodule-kit\u002Fregistries-and-menus","3.modules\u002F8.platform\u002F1.module-kit\u002F3.registries-and-menus",{"title":493,"path":494,"stem":495},"Translations","\u002Fmodules\u002Fplatform\u002Fmodule-kit\u002Fi18n","3.modules\u002F8.platform\u002F1.module-kit\u002F4.i18n",{"title":497,"path":498,"stem":499},"Database helpers","\u002Fmodules\u002Fplatform\u002Fmodule-kit\u002Fdatabase","3.modules\u002F8.platform\u002F1.module-kit\u002F5.database",{"title":501,"path":502,"stem":503,"children":504},"Base Layer","\u002Fmodules\u002Fplatform\u002Fbase-layer","3.modules\u002F8.platform\u002F2.base-layer\u002Findex",[505,506,510,514],{"title":177,"path":502,"stem":503},{"title":507,"path":508,"stem":509},"Content collections","\u002Fmodules\u002Fplatform\u002Fbase-layer\u002Fcontent-collections","3.modules\u002F8.platform\u002F2.base-layer\u002F2.content-collections",{"title":511,"path":512,"stem":513},"Layouts and routing","\u002Fmodules\u002Fplatform\u002Fbase-layer\u002Flayouts-and-routing","3.modules\u002F8.platform\u002F2.base-layer\u002F3.layouts-and-routing",{"title":515,"path":516,"stem":517},"Composables and utils","\u002Fmodules\u002Fplatform\u002Fbase-layer\u002Fcomposables-and-utils","3.modules\u002F8.platform\u002F2.base-layer\u002F4.composables-and-utils",{"title":519,"icon":53,"path":520,"stem":521,"children":522,"page":53},"Volunteering","\u002Fmodules\u002Fvolunteering","3.modules\u002F9.volunteering",[523,527,531],{"title":524,"path":525,"stem":526},"Operations","\u002Fmodules\u002Fvolunteering\u002Foperations","3.modules\u002F9.volunteering\u002F1.operations",{"title":528,"path":529,"stem":530},"Crew","\u002Fmodules\u002Fvolunteering\u002Fcrew","3.modules\u002F9.volunteering\u002F2.crew",{"title":532,"path":533,"stem":534},"Shifts","\u002Fmodules\u002Fvolunteering\u002Fshifts","3.modules\u002F9.volunteering\u002F3.shifts",{"title":536,"icon":537,"path":538,"stem":539,"children":540,"page":53},"Examples","i-lucide-code-xml","\u002Fexamples","4.examples",[541,570,580],{"title":542,"icon":53,"path":543,"stem":544,"children":545,"page":53},"Starters","\u002Fexamples\u002Fstarters","4.examples\u002F1.starters",[546,550,555,560,565],{"title":547,"path":548,"stem":549},"Workspace","\u002Fexamples\u002Fstarters\u002Fworkspace","4.examples\u002F1.starters\u002F1.workspace",{"title":551,"path":552,"stem":553,"icon":554},"Mobile starter","\u002Fexamples\u002Fstarters\u002Fmobile","4.examples\u002F1.starters\u002F2.mobile","i-lucide-smartphone",{"title":556,"path":557,"stem":558,"icon":559},"Standalone mobile starter","\u002Fexamples\u002Fstarters\u002Fmobile-standalone","4.examples\u002F1.starters\u002F3.mobile-standalone","i-lucide-tablet-smartphone",{"title":561,"path":562,"stem":563,"icon":564},"Desktop starter","\u002Fexamples\u002Fstarters\u002Fdesktop","4.examples\u002F1.starters\u002F4.desktop","i-lucide-monitor",{"title":566,"path":567,"stem":568,"icon":569},"Multi-platform starter","\u002Fexamples\u002Fstarters\u002Fmulti-platform","4.examples\u002F1.starters\u002F5.multi-platform","i-lucide-layers",{"title":571,"icon":53,"path":572,"stem":573,"children":574,"page":53},"Apps","\u002Fexamples\u002Fapps","4.examples\u002F2.apps",[575],{"title":576,"path":577,"stem":578,"icon":579},"Frigear website app","\u002Fexamples\u002Fapps\u002Ffrigear-nu-website","4.examples\u002F2.apps\u002F1.frigear-nu-website","i-lucide-layout-dashboard",{"title":581,"icon":53,"path":582,"stem":583,"children":584,"page":53},"Tasks","\u002Fexamples\u002Ftasks","4.examples\u002F3.tasks",[585,589,593,598,603],{"title":586,"path":587,"stem":588,"icon":74},"Protect a route","\u002Fexamples\u002Ftasks\u002Fprotect-a-route","4.examples\u002F3.tasks\u002F1.protect-a-route",{"title":590,"path":591,"stem":592,"icon":579},"Add an admin page","\u002Fexamples\u002Ftasks\u002Fadd-an-admin-page","4.examples\u002F3.tasks\u002F2.add-an-admin-page",{"title":594,"path":595,"stem":596,"icon":597},"Sell event tickets","\u002Fexamples\u002Ftasks\u002Fsell-event-tickets","4.examples\u002F3.tasks\u002F3.sell-event-tickets","i-lucide-ticket",{"title":599,"path":600,"stem":601,"icon":602},"Build a form","\u002Fexamples\u002Ftasks\u002Fbuild-a-form","4.examples\u002F3.tasks\u002F4.build-a-form","i-lucide-clipboard-list",{"title":604,"path":605,"stem":606,"icon":607},"Send an email","\u002Fexamples\u002Ftasks\u002Fsend-an-email","4.examples\u002F3.tasks\u002F5.send-an-email","i-lucide-mail",{"title":462,"icon":609,"path":610,"stem":611,"children":612,"page":53},"i-lucide-square-terminal","\u002Fcli","5.cli",[613,616,621,625,630,633,638,642,647],{"title":177,"path":614,"stem":615,"icon":609},"\u002Fcli\u002Foverview","5.cli\u002F1.overview",{"title":617,"path":618,"stem":619,"icon":620},"Create a project","\u002Fcli\u002Fcreate-a-project","5.cli\u002F2.create-a-project","i-lucide-folder-plus",{"title":622,"path":623,"stem":624,"icon":569},"Platforms","\u002Fcli\u002Fplatforms","5.cli\u002F3.platforms",{"title":626,"path":627,"stem":628,"icon":629},"Custom platforms","\u002Fcli\u002Fcustom-platforms","5.cli\u002F4.custom-platforms","i-lucide-monitor-cog",{"title":160,"path":631,"stem":632,"icon":161},"\u002Fcli\u002Fmodules","5.cli\u002F5.modules",{"title":634,"path":635,"stem":636,"icon":637},"Refactoring","\u002Fcli\u002Frefactoring","5.cli\u002F6.refactoring","i-lucide-folder-tree",{"title":639,"path":640,"stem":641,"icon":52},"Upgrade","\u002Fcli\u002Fupgrade","5.cli\u002F7.upgrade",{"title":643,"path":644,"stem":645,"icon":646},"From code","\u002Fcli\u002Ffrom-code","5.cli\u002F8.from-code","i-lucide-code",{"title":648,"path":649,"stem":650,"icon":138},"Environment files","\u002Fcli\u002Fenvironment","5.cli\u002F9.environment",{"title":652,"icon":653,"path":654,"stem":655,"children":656,"page":53},"Contribute","i-lucide-git-pull-request","\u002Fcontribute","6.contribute",[657,660,665,691,696,699,703,716],{"title":177,"path":658,"stem":659,"icon":653},"\u002Fcontribute\u002Foverview","6.contribute\u002F1.overview",{"title":661,"path":662,"stem":663,"icon":664},"Local development","\u002Fcontribute\u002Flocal-development","6.contribute\u002F2.local-development","i-lucide-terminal",{"title":666,"icon":53,"path":667,"stem":668,"children":669,"page":53},"Writing a module","\u002Fcontribute\u002Fwriting-a-module","6.contribute\u002F3.writing-a-module",[670,674,679,683,688],{"title":671,"path":672,"stem":673,"icon":38},"Scaffold a module","\u002Fcontribute\u002Fwriting-a-module\u002Fscaffold","6.contribute\u002F3.writing-a-module\u002F1.scaffold",{"title":675,"path":676,"stem":677,"icon":678},"Setup checklist","\u002Fcontribute\u002Fwriting-a-module\u002Fsetup-checklist","6.contribute\u002F3.writing-a-module\u002F2.setup-checklist","i-lucide-list-checks",{"title":680,"path":681,"stem":682,"icon":43},"Database tables","\u002Fcontribute\u002Fwriting-a-module\u002Fdatabase-tables","6.contribute\u002F3.writing-a-module\u002F3.database-tables",{"title":684,"path":685,"stem":686,"icon":687},"Testing","\u002Fcontribute\u002Fwriting-a-module\u002Ftesting","6.contribute\u002F3.writing-a-module\u002F4.testing","i-lucide-flask-conical",{"title":71,"path":689,"stem":690,"icon":74},"\u002Fcontribute\u002Fwriting-a-module\u002Faccess-control","6.contribute\u002F3.writing-a-module\u002F5.access-control",{"title":692,"path":693,"stem":694,"icon":695},"Publishing","\u002Fcontribute\u002Fpublishing","6.contribute\u002F4.publishing","i-lucide-package-check",{"title":542,"path":697,"stem":698,"icon":6},"\u002Fcontribute\u002Fstarters","6.contribute\u002F5.starters",{"title":700,"path":701,"stem":702,"icon":56},"Documentation","\u002Fcontribute\u002Fdocumentation","6.contribute\u002F6.documentation",{"title":704,"icon":53,"path":705,"stem":706,"children":707,"page":53},"Tooling","\u002Fcontribute\u002Ftooling","6.contribute\u002F7.tooling",[708,711],{"title":462,"path":709,"stem":710,"icon":609},"\u002Fcontribute\u002Ftooling\u002Fcli","6.contribute\u002F7.tooling\u002F1.cli",{"title":712,"path":713,"stem":714,"icon":715},"ESLint config","\u002Fcontribute\u002Ftooling\u002Feslint-config","6.contribute\u002F7.tooling\u002F2.eslint-config","i-lucide-spell-check",{"title":717,"icon":53,"path":718,"stem":719,"children":720},"Decisions","\u002Fcontribute\u002Fdecisions","6.contribute\u002F8.decisions\u002Findex",[721,723,728],{"title":717,"path":718,"stem":719,"icon":722},"i-lucide-scale",{"title":724,"path":725,"stem":726,"icon":727},"Session lifetimes per OAuth client","\u002Fcontribute\u002Fdecisions\u002Foauth-token-lifetimes","6.contribute\u002F8.decisions\u002F1.oauth-token-lifetimes","i-lucide-timer",{"title":729,"path":730,"stem":731,"icon":74},"One permission model","\u002Fcontribute\u002Fdecisions\u002Fpermission-model","6.contribute\u002F8.decisions\u002F2.permission-model",{"id":733,"title":377,"body":734,"description":3464,"extension":3465,"links":3466,"meta":3467,"navigation":2580,"path":378,"seo":3468,"stem":379,"__hash__":3469},"docs\u002F3.modules\u002F6.communication\u002F3.push.md",{"type":735,"value":736,"toc":3429},"minimark",[737,753,776,781,869,873,936,940,949,1010,1013,1017,1288,1301,1305,1314,1466,1476,1479,1501,1504,1507,1569,1585,1592,1595,1598,1663,1667,1676,1704,1708,1837,1841,1946,1949,1952,1955,2051,2076,2084,2087,2177,2190,2216,2222,2226,2236,2240,2263,2465,2502,2506,2525,2528,2531,3049,3052,3055,3064,3075,3078,3092,3096,3106,3261,3264,3271,3275,3333,3348,3351,3393,3397,3425],[738,739,740,741,744,745,749,750,752],"p",{},"Push lets your app reach a person's phone. The mobile app registers its device, and Push delivers the push notifications\nyour server code sends through ",[742,743,356],"a",{"href":357},": it is Notify's push driver. Which channels\nreach a user for each kind of message is Notify's ",[746,747,748],"code",{},"notifyUser",", with the choices kept by\n",[742,751,229],{"href":230},".",[738,754,755,756,759,760,763,764,767,768,770,771,775],{},"The package is ",[746,757,758],{},"@frigear-nu\u002Fpush",". It sends to Android through Firebase Cloud Messaging (FCM). It sends to iOS through\nFCM as well when the app registers its FCM token, and otherwise straight to the Apple Push Notification service (APNs).\nIt talks to FCM with ",[746,761,762],{},"fetch"," and to APNs with ",[746,765,766],{},"node:http2",", each with a signed token, so no provider SDK is installed.\nOn Cloudflare Workers, which have no ",[746,769,766],{},", iOS goes through FCM (see ",[742,772,774],{"href":773},"#ios-through-fcm","iOS through FCM",").",[777,778,780],"h2",{"id":779},"what-you-get","What you get",[782,783,784,792,815,830,845,857],"ul",{},[785,786,787,791],"li",{},[788,789,790],"strong",{},"Server routes"," (server mode, on by default): register, list and remove the caller's devices. Staff routes list a\nuser's devices and send a test push.",[785,793,794,797,798,801,802,808,809,814],{},[788,795,796],{},"Notify's push driver"," (server mode): Push sets itself as ",[746,799,800],{},"notify.push.driver",", so\n",[742,803,805],{"href":804},"\u002Fmodules\u002Fcommunication\u002Fnotify#push",[746,806,807],{},"dispatchPushNotification"," and the push channel of\n",[742,810,812],{"href":811},"\u002Fmodules\u002Fcommunication\u002Fnotify#notifying-a-user",[746,813,748],{}," reach the users' devices.",[785,816,817,820,821,824,825,829],{},[788,818,819],{},"Server helpers"," (server mode): ",[746,822,823],{},"sendPush",", and ",[742,826,828],{"href":827},"#devices-of-another-owner","devices of another owner"," for a module\nthat pairs shared phones.",[785,831,832,820,835,838,839,841,842,844],{},[788,833,834],{},"Account page",[746,836,837],{},"\u002Faccount\u002Fdevices"," lists the user's own devices and removes one. It shows up in the\n",[742,840,203],{"href":204}," menu when ",[742,843,430],{"href":431}," is installed.",[785,846,847,850,851,853,854,856],{},[788,848,849],{},"Admin tab"," (with ",[742,852,225],{"href":427}," and ",[742,855,434],{"href":435},"): a Devices tab on the\nadmin user page, with a Send test push action.",[785,858,859,862,863,866,867,752],{},[788,860,861],{},"Device side"," (mobile): ",[746,864,865],{},"usePushDevice()"," and a plugin that registers the device when someone signs in, for a Capacitor\napp that uses ",[742,868,438],{"href":439},[870,871],"module-runtime",{":client":872,":mobile":872,":server":872},"true",[874,875,876,895,912,930],"note",{},[738,877,878,881,882,885,886,888,889,885,891,853,893,752],{},[788,879,880],{},"Installed for you (server mode):"," ",[746,883,884],{},"@frigear-nu\u002Fmodule-kit",", ",[742,887,172],{"href":173},",\n",[742,890,199],{"href":200},[742,892,356],{"href":357},[742,894,402],{"href":403},[738,896,897,881,900,903,904,907,908,911],{},[788,898,899],{},"You add:",[746,901,902],{},"@nuxthub\u002Fcore"," (server mode), and a push plugin in the mobile app: ",[746,905,906],{},"@capacitor-firebase\u002Fmessaging","\n(the FCM token on iOS and Android) or ",[746,909,910],{},"@capacitor\u002Fpush-notifications"," (the APNs token on iOS).",[738,913,914,881,917,853,919,921,922,853,924,926,927,929],{},[788,915,916],{},"Optional:",[742,918,225],{"href":427},[742,920,434],{"href":435}," for the admin tab,\n",[742,923,203],{"href":204},[742,925,430],{"href":431}," for the account page, and\n",[742,928,438],{"href":439}," for registration.",[738,931,932,935],{},[788,933,934],{},"In client mode"," (a mobile app without a server) Push installs only Auth and Module Kit. It adds no tables, routes or\npages, and pulls in no server module.",[777,937,939],{"id":938},"two-modes","Two modes",[738,941,942,943,946,947,752],{},"Push follows the app's ",[746,944,945],{},"authentication.mode",", like ",[742,948,207],{"href":208},[950,951,952,967],"table",{},[953,954,955],"thead",{},[956,957,958,961,964],"tr",{},[959,960],"th",{},[959,962,963],{},"Server mode (the default)",[959,965,966],{},"Client mode (the mobile app)",[968,969,970,982,997],"tbody",{},[956,971,972,976,979],{},[973,974,975],"td",{},"Where",[973,977,978],{},"The app that has the database and the routes",[973,980,981],{},"The Capacitor app that signs in at an issuer",[956,983,984,987,992],{},[973,985,986],{},"Adds",[973,988,989,990],{},"The devices table, routes, access, the admin tab, Notify's push driver, ",[746,991,823],{},[973,993,994,996],{},[746,995,865],{}," and the sign-in plugin",[956,998,999,1002,1007],{},[973,1000,1001],{},"Needs",[973,1003,1004,1006],{},[746,1005,902],{},", Users, Notify",[973,1008,1009],{},"Mobile (optional) and a push plugin",[738,1011,1012],{},"The mobile app registers its device with the server's routes through its bearer token. The server sends the pushes.",[777,1014,1016],{"id":1015},"quick-setup","Quick setup",[1018,1019,1020,1025,1053,1130,1142,1146,1158,1162,1165,1280],"steps",{},[1021,1022,1024],"h3",{"id":1023},"install-push-on-the-server","Install Push on the server",[1026,1027,1032],"pre",{"className":1028,"code":1029,"language":1030,"meta":1031,"style":1031},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","pnpm add @frigear-nu\u002Fpush @nuxthub\u002Fcore\n","bash","",[746,1033,1034],{"__ignoreMap":1031},[1035,1036,1039,1043,1047,1050],"span",{"class":1037,"line":1038},"line",1,[1035,1040,1042],{"class":1041},"sBMFI","pnpm",[1035,1044,1046],{"class":1045},"sfazB"," add",[1035,1048,1049],{"class":1045}," @frigear-nu\u002Fpush",[1035,1051,1052],{"class":1045}," @nuxthub\u002Fcore\n",[1026,1054,1059],{"className":1055,"code":1056,"filename":1057,"language":1058,"meta":1031,"style":1031},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","export default defineNuxtConfig({\n  modules: ['@nuxthub\u002Fcore', '@frigear-nu\u002Fpush'], \u002F\u002F installs Users, Auth and Notify for you\n})\n","nuxt.config.ts","ts",[746,1060,1061,1082,1121],{"__ignoreMap":1031},[1035,1062,1063,1067,1070,1074,1078],{"class":1037,"line":1038},[1035,1064,1066],{"class":1065},"s7zQu","export",[1035,1068,1069],{"class":1065}," default",[1035,1071,1073],{"class":1072},"s2Zo4"," defineNuxtConfig",[1035,1075,1077],{"class":1076},"sTEyZ","(",[1035,1079,1081],{"class":1080},"sMK4o","{\n",[1035,1083,1085,1089,1092,1095,1098,1100,1102,1105,1108,1110,1112,1115,1117],{"class":1037,"line":1084},2,[1035,1086,1088],{"class":1087},"swJcz","  modules",[1035,1090,1091],{"class":1080},":",[1035,1093,1094],{"class":1076}," [",[1035,1096,1097],{"class":1080},"'",[1035,1099,902],{"class":1045},[1035,1101,1097],{"class":1080},[1035,1103,1104],{"class":1080},",",[1035,1106,1107],{"class":1080}," '",[1035,1109,758],{"class":1045},[1035,1111,1097],{"class":1080},[1035,1113,1114],{"class":1076},"]",[1035,1116,1104],{"class":1080},[1035,1118,1120],{"class":1119},"sHwdD"," \u002F\u002F installs Users, Auth and Notify for you\n",[1035,1122,1124,1127],{"class":1037,"line":1123},3,[1035,1125,1126],{"class":1080},"}",[1035,1128,1129],{"class":1076},")\n",[1131,1132,1133,1134,1137,1138,1141],"warning",{},"Without a ",[742,1135,1136],{"href":91},"migration"," the ",[746,1139,1140],{},"push_devices"," table does not exist, and every route fails.",[1021,1143,1145],{"id":1144},"generate-the-migration","Generate the migration",[1026,1147,1149],{"className":1028,"code":1148,"language":1030,"meta":1031,"style":1031},"pnpm db:generate\n",[746,1150,1151],{"__ignoreMap":1031},[1035,1152,1153,1155],{"class":1037,"line":1038},[1035,1154,1042],{"class":1041},[1035,1156,1157],{"class":1045}," db:generate\n",[1021,1159,1161],{"id":1160},"send-a-notification","Send a notification",[738,1163,1164],{},"Send through Notify, which hands the push to Push:",[1026,1166,1169],{"className":1055,"code":1167,"filename":1168,"language":1058,"meta":1031,"style":1031},"export default defineEventHandler(async () => {\n  return dispatchPushNotification({ userIds: [42], title: 'Your shift tomorrow', body: 'You work 18:00 to 23:00.', url: '\u002Fshifts\u002F42' })\n  \u002F\u002F { sent: 1, failed: 0, revoked: 0 }\n})\n","server\u002Froutes\u002Fapi\u002Fremind.post.ts",[746,1170,1171,1195,1268,1273],{"__ignoreMap":1031},[1035,1172,1173,1175,1177,1180,1182,1186,1189,1192],{"class":1037,"line":1038},[1035,1174,1066],{"class":1065},[1035,1176,1069],{"class":1065},[1035,1178,1179],{"class":1072}," defineEventHandler",[1035,1181,1077],{"class":1076},[1035,1183,1185],{"class":1184},"spNyl","async",[1035,1187,1188],{"class":1080}," ()",[1035,1190,1191],{"class":1184}," =>",[1035,1193,1194],{"class":1080}," {\n",[1035,1196,1197,1200,1203,1205,1208,1211,1213,1215,1219,1221,1223,1226,1228,1230,1233,1235,1237,1240,1242,1244,1247,1249,1251,1254,1256,1258,1261,1263,1266],{"class":1037,"line":1084},[1035,1198,1199],{"class":1065},"  return",[1035,1201,1202],{"class":1072}," dispatchPushNotification",[1035,1204,1077],{"class":1087},[1035,1206,1207],{"class":1080},"{",[1035,1209,1210],{"class":1087}," userIds",[1035,1212,1091],{"class":1080},[1035,1214,1094],{"class":1087},[1035,1216,1218],{"class":1217},"sbssI","42",[1035,1220,1114],{"class":1087},[1035,1222,1104],{"class":1080},[1035,1224,1225],{"class":1087}," title",[1035,1227,1091],{"class":1080},[1035,1229,1107],{"class":1080},[1035,1231,1232],{"class":1045},"Your shift tomorrow",[1035,1234,1097],{"class":1080},[1035,1236,1104],{"class":1080},[1035,1238,1239],{"class":1087}," body",[1035,1241,1091],{"class":1080},[1035,1243,1107],{"class":1080},[1035,1245,1246],{"class":1045},"You work 18:00 to 23:00.",[1035,1248,1097],{"class":1080},[1035,1250,1104],{"class":1080},[1035,1252,1253],{"class":1087}," url",[1035,1255,1091],{"class":1080},[1035,1257,1107],{"class":1080},[1035,1259,1260],{"class":1045},"\u002Fshifts\u002F42",[1035,1262,1097],{"class":1080},[1035,1264,1265],{"class":1080}," }",[1035,1267,1129],{"class":1087},[1035,1269,1270],{"class":1037,"line":1123},[1035,1271,1272],{"class":1119},"  \u002F\u002F { sent: 1, failed: 0, revoked: 0 }\n",[1035,1274,1276,1278],{"class":1037,"line":1275},4,[1035,1277,1126],{"class":1080},[1035,1279,1129],{"class":1076},[738,1281,1282,1283,1287],{},"To respect each user's channel choices, send with Notify's\n",[742,1284,1285],{"href":811},[746,1286,748],{}," instead.",[1289,1290,1293,1296,1297,1300],"callout",{"color":1291,"icon":1292},"success","i-lucide-check",[788,1294,1295],{},"What you should see:"," with no credentials the ",[746,1298,1299],{},"log"," delivery writes the push to the server log, and every device\ncounts as sent.",[777,1302,1304],{"id":1303},"credentials","Credentials",[738,1306,1307,1308,1310,1311,1313],{},"Without credentials ",[746,1309,823],{}," only writes to the server log (the ",[746,1312,1299],{}," delivery), so development needs no setup. Set the\ncredentials as private runtime config through environment variables:",[950,1315,1316,1326],{},[953,1317,1318],{},[956,1319,1320,1323],{},[959,1321,1322],{},"Variable",[959,1324,1325],{},"What it is",[968,1327,1328,1349,1374,1384,1397,1407,1420,1437,1452],{},[956,1329,1330,1335],{},[973,1331,1332],{},[746,1333,1334],{},"NUXT_PUSH_DELIVERY",[973,1336,1337,1339,1340,1343,1344,1346,1347,752],{},[746,1338,1299],{}," or ",[746,1341,1342],{},"providers",". Unset: ",[746,1345,1342],{}," once any credentials are set, otherwise ",[746,1348,1299],{},[956,1350,1351,1356],{},[973,1352,1353],{},[746,1354,1355],{},"NUXT_PUSH_IOS",[973,1357,1358,1361,1362,1365,1366,1369,1370,752],{},[746,1359,1360],{},"apns"," (the default) or ",[746,1363,1364],{},"fcm",": where an iOS device goes when it registered without a ",[746,1367,1368],{},"provider",". See ",[742,1371,1373],{"href":1372},"#which-provider-a-device-uses","Which provider a device uses",[956,1375,1376,1381],{},[973,1377,1378],{},[746,1379,1380],{},"NUXT_PUSH_FCM_SERVICE_ACCOUNT",[973,1382,1383],{},"The whole service account JSON of your Firebase project (Project settings, Service accounts).",[956,1385,1386,1391],{},[973,1387,1388],{},[746,1389,1390],{},"NUXT_PUSH_APNS_KEY_ID",[973,1392,1393,1394,775],{},"The key id of your APNs authentication key (",[746,1395,1396],{},".p8",[956,1398,1399,1404],{},[973,1400,1401],{},[746,1402,1403],{},"NUXT_PUSH_APNS_TEAM_ID",[973,1405,1406],{},"Your Apple developer team id.",[956,1408,1409,1414],{},[973,1410,1411],{},[746,1412,1413],{},"NUXT_PUSH_APNS_TOPIC",[973,1415,1416,1417,752],{},"The app's bundle id, for example ",[746,1418,1419],{},"com.example.app",[956,1421,1422,1427],{},[973,1423,1424],{},[746,1425,1426],{},"NUXT_PUSH_APNS_PRIVATE_KEY",[973,1428,1429,1430,1432,1433,1436],{},"The ",[746,1431,1396],{}," key. Literal ",[746,1434,1435],{},"\\n"," stand for line breaks, so it fits one line.",[956,1438,1439,1444],{},[973,1440,1441],{},[746,1442,1443],{},"NUXT_PUSH_APNS_SANDBOX",[973,1445,1446,1448,1449,752],{},[746,1447,872],{}," for development builds of the app: sends to ",[746,1450,1451],{},"api.sandbox.push.apple.com",[956,1453,1454,1459],{},[973,1455,1456],{},[746,1457,1458],{},"NUXT_PUSH_TIMEOUT_MS",[973,1460,1461,1462,1465],{},"How long one provider request may take. Default ",[746,1463,1464],{},"10000",". A request that takes longer counts as failed.",[738,1467,1468,1469,1471,1472,1475],{},"When every iOS app registers its FCM token (",[742,1470,774],{"href":773},"), the service account is all the server\nneeds: the ",[746,1473,1474],{},"NUXT_PUSH_APNS_*"," variables are only for sending to APNs directly.",[738,1477,1478],{},"How the providers authenticate:",[782,1480,1481,1491],{},[785,1482,1483,1486,1487,1490],{},[788,1484,1485],{},"FCM"," (HTTP v1): Push signs a short JWT (RS256) with the service account key, exchanges it for an OAuth access token\nand keeps the token until a minute before it expires. It sends to\n",[746,1488,1489],{},"https:\u002F\u002Ffcm.googleapis.com\u002Fv1\u002Fprojects\u002F\u003Cproject_id>\u002Fmessages:send",", for Android and for iOS devices with an FCM\ntoken. FCM hands an iOS message on to APNs with the APNs key uploaded to the Firebase project.",[785,1492,1493,1496,1497,1500],{},[788,1494,1495],{},"APNs",": Push signs a JWT (ES256) with the key id and team id, keeps it for 50 minutes and sends to\n",[746,1498,1499],{},"https:\u002F\u002Fapi.push.apple.com\u002F3\u002Fdevice\u002F\u003Ctoken>"," over HTTP\u002F2, on one session per host that it reuses and closes when it\nidles or fails.",[1021,1502,1373],{"id":1503},"which-provider-a-device-uses",[738,1505,1506],{},"Every device is stored with the provider that issued its token, and its pushes go there:",[950,1508,1509,1519],{},[953,1510,1511],{},[956,1512,1513,1516],{},[959,1514,1515],{},"Device",[959,1517,1518],{},"Provider",[968,1520,1521,1529,1542,1554],{},[956,1522,1523,1526],{},[973,1524,1525],{},"Android",[973,1527,1528],{},"FCM, always.",[956,1530,1531,1537],{},[973,1532,1533,1534],{},"iOS, registered with ",[746,1535,1536],{},"provider: 'fcm'",[973,1538,1539,1540,752],{},"FCM. The device side of Push sends this when the app uses ",[746,1541,906],{},[956,1543,1544,1549],{},[973,1545,1533,1546],{},[746,1547,1548],{},"provider: 'apns'",[973,1550,1551,1552,752],{},"APNs. The device side sends this when the app uses ",[746,1553,910],{},[956,1555,1556,1559],{},[973,1557,1558],{},"iOS, registered without a provider",[973,1560,1561,1563,1564,1566,1567,752],{},[746,1562,1355],{},": ",[746,1565,1360],{}," unless you set ",[746,1568,1364],{},[738,1570,1571,1573,1574,1576,1577,1579,1580,1582,1583,752],{},[746,1572,1355],{}," defaults to ",[746,1575,1360],{}," because a client that does not say is one built on ",[746,1578,910],{},",\nwhose iOS token is an APNs token. Sending that token to FCM would not just fail: FCM rejects it as invalid, and the\ndevice would be revoked. Set ",[746,1581,1364],{}," only when your own iOS client registers FCM tokens without sending ",[746,1584,1368],{},[738,1586,1587,1588,1591],{},"A device that registers its token again with another provider moves to it. An app update that switches plugin hands\nout a new token instead (the FCM token in place of the APNs token): the device side then sends the token it registered\nbefore as ",[746,1589,1590],{},"replaces",", and the server removes the caller's device with that token, so the phone is not notified twice.\nEach phone moves at its next start.",[1021,1593,774],{"id":1594},"ios-through-fcm",[738,1596,1597],{},"FCM delivers to iOS too: it hands the message to APNs with an APNs key you upload to Firebase. The server then needs no\nHTTP\u002F2 and no Apple credentials, which is what makes iOS work on Cloudflare Workers.",[1018,1599,1601,1606,1609,1626,1629,1633,1650,1654],{"level":1600},"4",[1602,1603,1605],"h4",{"id":1604},"upload-your-apns-key-to-firebase","Upload your APNs key to Firebase",[738,1607,1608],{},"You do this once per Firebase project, in the Apple developer account and the Firebase console. Push cannot do it for\nyou.",[1610,1611,1612,1618],"ol",{},[785,1613,1614,1615,1617],{},"In the Apple developer account, under Certificates, Identifiers & Profiles, Keys, create a key with Apple Push\nNotifications service (APNs) enabled, download the ",[746,1616,1396],{}," file and note its key id and your team id.",[785,1619,1620,1621,1623,1624,775],{},"In the Firebase console, open Project settings, Cloud Messaging, Apple app configuration, and upload the ",[746,1622,1396],{}," file\nunder APNs Authentication Key with the key id and team id. Add the iOS app to the Firebase project first if it is not\nthere (its bundle id, for example ",[746,1625,1419],{},[738,1627,1628],{},"One key serves development and production builds, so there is no sandbox setting on this path.",[1602,1630,1632],{"id":1631},"register-the-fcm-token-in-the-app","Register the FCM token in the app",[738,1634,1635,1636,1638,1639,1641,1642,1646,1647,1649],{},"Install ",[746,1637,906],{}," in the mobile app instead of ",[746,1640,910],{},", and set it up as\n",[742,1643,1645],{"href":1644},"#the-mobile-app","The mobile app"," describes. Push then registers the FCM token with ",[746,1648,1536],{},", on iOS and on\nAndroid.",[1602,1651,1653],{"id":1652},"set-the-service-account-on-the-server","Set the service account on the server",[738,1655,1656,1657,1659,1660,1662],{},"Set ",[746,1658,1380],{},". The ",[746,1661,1474],{}," variables can stay empty.",[1021,1664,1666],{"id":1665},"apns-needs-http2","APNs needs HTTP\u002F2",[738,1668,1669,1670,1672,1673,1675],{},"APNs refuses HTTP\u002F1.1, and the global ",[746,1671,762],{}," of Node speaks only HTTP\u002F1.1. So Push sends to APNs through ",[746,1674,766],{},",\nwhich it imports when the first push to APNs goes out.",[1677,1678,1679,1685,1686,1689,1690,1692,1693,1696,1697,1700,1701,752],"caution",{},[788,1680,1681,1682,1684],{},"Cloudflare Workers have no ",[746,1683,766],{}," client."," There every push to APNs fails (it counts as ",[746,1687,1688],{},"failed",", never as a\ndead token) and Push logs the reason once. On Workers, register the FCM token on iOS (",[742,1691,774],{"href":773},").\nTo keep sending to APNs directly, send from a Node runtime, or through a relay: call ",[746,1694,1695],{},"setPushHttp2Transport(transport)","\nfrom a Nitro plugin with a function that sends the request (",[746,1698,1699],{},"{ origin, path, headers, body, timeoutMs }",") to your relay\nand answers ",[746,1702,1703],{},"{ status, body }",[1021,1705,1707],{"id":1706},"timeouts-dead-tokens-and-misconfiguration","Timeouts, dead tokens and misconfiguration",[782,1709,1710,1722,1745,1767,1808,1814],{},[785,1711,1712,1715,1716,1718,1719,1721],{},[788,1713,1714],{},"Timeouts."," Every provider request is aborted after ",[746,1717,1458],{}," (10 seconds). A timeout counts as\n",[746,1720,1688],{},", never as dead, and the next push tries again.",[785,1723,1724,1727,1728,1731,1732,1735,1736,1339,1739,1742,1743,752],{},[788,1725,1726],{},"FCM dead tokens."," A device is revoked only for ",[746,1729,1730],{},"UNREGISTERED",", or ",[746,1733,1734],{},"INVALID_ARGUMENT"," about the registration token\nitself. A bare ",[746,1737,1738],{},"404",[746,1740,1741],{},"NOT_FOUND"," can be a wrong project, so it is only ",[746,1744,1688],{},[785,1746,1747,1750,1751,1754,1755,1758,1759,1762,1763,1766],{},[788,1748,1749],{},"APNs dead tokens."," A device is revoked for ",[746,1752,1753],{},"410 Unregistered",". ",[746,1756,1757],{},"400 BadDeviceToken"," also means a sandbox token sent\nto production (or the other way round), so when ",[788,1760,1761],{},"every"," device of one call that went to APNs gets it, none is\nrevoked right away and a warning names ",[746,1764,1765],{},"push.apns.sandbox"," in the log; it counts as a refused push instead (next\npoint). iOS devices with an FCM token follow the FCM rules above.",[785,1768,1769,1772,1773,1776,1777,1780,1781,1784,1785,1788,1789,885,1792,1795,1796,1799,1800,1803,1804,1807],{},[788,1770,1771],{},"Three refused pushes in a row revoke a device."," Each device keeps a count (",[746,1774,1775],{},"push_devices.failures",") of the pushes\nits provider refused for it in a row: a ",[746,1778,1779],{},"4xx"," about the request for that device (",[746,1782,1783],{},"BadDeviceToken"," included), not a\ntimeout, an outage (",[746,1786,1787],{},"5xx","), bad credentials (",[746,1790,1791],{},"401",[746,1793,1794],{},"403","), a payload too large (",[746,1797,1798],{},"413",") or a rate limit (",[746,1801,1802],{},"429","), and\nnot a missing provider. A delivered push sets it back to 0; at 3 the device is revoked (counted in ",[746,1805,1806],{},"revoked","). So the\nonly iOS device of a user with a dead token is revoked after three pushes. Registering the device again clears the\ncount and the revocation.",[785,1809,1810,1813],{},[788,1811,1812],{},"One device failing never fails the call",", and a revoked device is not sent to again.",[785,1815,1816,1819,1820,1339,1822,1824,1825,1827,1828,1830,1831,1833,1834,1836],{},[788,1817,1818],{},"Misconfiguration is loud, not fatal."," The server checks the settings when it starts and logs every invalid one: a\n",[746,1821,1334],{},[746,1823,1355],{}," it does not know, or a service account that is not valid JSON or lacks a\nfield. Until it is fixed, ",[746,1826,823],{}," logs the error once and counts every device as failed: it never throws into the\ncaller (",[746,1829,748],{},"), and it never falls back to the ",[746,1832,1299],{}," delivery. Registering a device keeps working, with ",[746,1835,1360],{},"\nfor an iOS device that did not name its provider. The log delivery is only chosen when no credentials are set at all.",[777,1838,1840],{"id":1839},"options","Options",[950,1842,1843,1859],{},[953,1844,1845],{},[956,1846,1847,1850,1853,1856],{},[959,1848,1849],{},"Option",[959,1851,1852],{},"Type",[959,1854,1855],{},"Default",[959,1857,1858],{},"What it does",[968,1860,1861,1892,1915],{},[956,1862,1863,1868,1873,1876],{},[973,1864,1865],{},[746,1866,1867],{},"push.settings.delivery",[973,1869,1870],{},[746,1871,1872],{},"'log' | 'providers'",[973,1874,1875],{},"unset",[973,1877,1878,1879,1881,1882,1884,1885,1887,1888,775],{},"How ",[746,1880,823],{}," delivers. ",[746,1883,1334],{}," overrides it. Not the same as Notify's ",[746,1886,800],{},", which Push fills (see ",[742,1889,1891],{"href":1890},"#sending","Sending",[956,1893,1894,1899,1904,1908],{},[973,1895,1896],{},[746,1897,1898],{},"push.settings.autoRegister",[973,1900,1901],{},[746,1902,1903],{},"boolean",[973,1905,1906],{},[746,1907,872],{},[973,1909,1910,1911,1914],{},"Register the device as soon as someone is signed in. ",[746,1912,1913],{},"false"," leaves it to your app.",[956,1916,1917,1922,1927,1931],{},[973,1918,1919],{},[746,1920,1921],{},"push.pages.devices",[973,1923,1924],{},[746,1925,1926],{},"boolean | string",[973,1928,1929],{},[746,1930,872],{},[973,1932,1429,1933,1754,1937,1939,1940,1942,1943,1945],{},[742,1934,1936],{"href":1935},"#account-page","account devices page",[746,1938,872],{}," mounts it at ",[746,1941,837],{},", a string at that path, ",[746,1944,1913],{}," leaves it out (the routes stay).",[777,1947,1891],{"id":1948},"sending",[1021,1950,807],{"id":1951},"dispatchpushnotification",[738,1953,1954],{},"Feature code sends push through Notify, like email and SMS:",[1026,1956,1958],{"className":1055,"code":1957,"language":1058,"meta":1031,"style":1031},"await dispatchPushNotification({ userIds: [42], title: 'Shift tomorrow', body: 'You work 18:00', url: '\u002Fshifts\u002F42', data: { shiftId: '42' } })\n  \u002F\u002F → { sent: 1, failed: 0, revoked: 0 }\n",[746,1959,1960,2046],{"__ignoreMap":1031},[1035,1961,1962,1965,1967,1969,1971,1973,1975,1977,1979,1981,1983,1985,1987,1989,1992,1994,1996,1998,2000,2002,2005,2007,2009,2011,2013,2015,2017,2019,2021,2024,2026,2029,2032,2034,2036,2038,2040,2042,2044],{"class":1037,"line":1038},[1035,1963,1964],{"class":1065},"await",[1035,1966,1202],{"class":1072},[1035,1968,1077],{"class":1076},[1035,1970,1207],{"class":1080},[1035,1972,1210],{"class":1087},[1035,1974,1091],{"class":1080},[1035,1976,1094],{"class":1076},[1035,1978,1218],{"class":1217},[1035,1980,1114],{"class":1076},[1035,1982,1104],{"class":1080},[1035,1984,1225],{"class":1087},[1035,1986,1091],{"class":1080},[1035,1988,1107],{"class":1080},[1035,1990,1991],{"class":1045},"Shift tomorrow",[1035,1993,1097],{"class":1080},[1035,1995,1104],{"class":1080},[1035,1997,1239],{"class":1087},[1035,1999,1091],{"class":1080},[1035,2001,1107],{"class":1080},[1035,2003,2004],{"class":1045},"You work 18:00",[1035,2006,1097],{"class":1080},[1035,2008,1104],{"class":1080},[1035,2010,1253],{"class":1087},[1035,2012,1091],{"class":1080},[1035,2014,1107],{"class":1080},[1035,2016,1260],{"class":1045},[1035,2018,1097],{"class":1080},[1035,2020,1104],{"class":1080},[1035,2022,2023],{"class":1087}," data",[1035,2025,1091],{"class":1080},[1035,2027,2028],{"class":1080}," {",[1035,2030,2031],{"class":1087}," shiftId",[1035,2033,1091],{"class":1080},[1035,2035,1107],{"class":1080},[1035,2037,1218],{"class":1045},[1035,2039,1097],{"class":1080},[1035,2041,1265],{"class":1080},[1035,2043,1265],{"class":1080},[1035,2045,1129],{"class":1076},[1035,2047,2048],{"class":1037,"line":1084},[1035,2049,2050],{"class":1119},"  \u002F\u002F → { sent: 1, failed: 0, revoked: 0 }\n",[738,2052,2053,2054,2056,2057,2059,2060,2062,2063,853,2066,2069,2070,2072,2073,2075],{},"Push registers itself as Notify's push driver (",[746,2055,800],{},", as a default: a driver your app sets in\n",[746,2058,1057],{}," wins). The driver calls ",[746,2061,823],{}," below, so everything said there applies: the devices, the locale of\n",[746,2064,2065],{},"title",[746,2067,2068],{},"body",", the result and the ",[746,2071,1299],{}," delivery. Your module depends on Notify only, and push goes out wherever\nPush is installed; without it, Notify's ",[746,2074,1299],{}," driver logs the push.",[738,2077,2078,2079,2083],{},"This sends to the users without asking their channel choices. To respect them, use Notify's\n",[742,2080,2081],{"href":811},[746,2082,748],{},": its push channel goes through this driver too.",[1021,2085,823],{"id":2086},"sendpush",[1026,2088,2090],{"className":1055,"code":2089,"language":1058,"meta":1031,"style":1031},"sendPush(event, { userIds: [42], title: 'Shift tomorrow', body: 'You work 18:00', url: '\u002Fshifts\u002F42', data: { shiftId: '42' } })\n  \u002F\u002F → { sent: 1, failed: 0, revoked: 0 }\n",[746,2091,2092,2173],{"__ignoreMap":1031},[1035,2093,2094,2096,2099,2101,2103,2105,2107,2109,2111,2113,2115,2117,2119,2121,2123,2125,2127,2129,2131,2133,2135,2137,2139,2141,2143,2145,2147,2149,2151,2153,2155,2157,2159,2161,2163,2165,2167,2169,2171],{"class":1037,"line":1038},[1035,2095,823],{"class":1072},[1035,2097,2098],{"class":1076},"(event",[1035,2100,1104],{"class":1080},[1035,2102,2028],{"class":1080},[1035,2104,1210],{"class":1087},[1035,2106,1091],{"class":1080},[1035,2108,1094],{"class":1076},[1035,2110,1218],{"class":1217},[1035,2112,1114],{"class":1076},[1035,2114,1104],{"class":1080},[1035,2116,1225],{"class":1087},[1035,2118,1091],{"class":1080},[1035,2120,1107],{"class":1080},[1035,2122,1991],{"class":1045},[1035,2124,1097],{"class":1080},[1035,2126,1104],{"class":1080},[1035,2128,1239],{"class":1087},[1035,2130,1091],{"class":1080},[1035,2132,1107],{"class":1080},[1035,2134,2004],{"class":1045},[1035,2136,1097],{"class":1080},[1035,2138,1104],{"class":1080},[1035,2140,1253],{"class":1087},[1035,2142,1091],{"class":1080},[1035,2144,1107],{"class":1080},[1035,2146,1260],{"class":1045},[1035,2148,1097],{"class":1080},[1035,2150,1104],{"class":1080},[1035,2152,2023],{"class":1087},[1035,2154,1091],{"class":1080},[1035,2156,2028],{"class":1080},[1035,2158,2031],{"class":1087},[1035,2160,1091],{"class":1080},[1035,2162,1107],{"class":1080},[1035,2164,1218],{"class":1045},[1035,2166,1097],{"class":1080},[1035,2168,1265],{"class":1080},[1035,2170,1265],{"class":1080},[1035,2172,1129],{"class":1076},[1035,2174,2175],{"class":1037,"line":1084},[1035,2176,2050],{"class":1119},[738,2178,2179,2181,2182,2185,2186,2189],{},[746,2180,823],{}," sends to every active device of the users. ",[746,2183,2184],{},"url"," is a path in the app, which opens when the notification is\ntapped. ",[746,2187,2188],{},"data"," values must be strings. It returns how many devices the provider accepted, how many failed, and how many\ntokens were dead and are now revoked.",[738,2191,2192,853,2194,2196,2197,2200,2201,2204,2205,2208,2209,2211,2212,2215],{},[746,2193,2065],{},[746,2195,2068],{}," can be one text per locale, ",[746,2198,2199],{},"{ da: 'Vagt i morgen', en: 'Shift tomorrow' }",": each device gets the text for\nthe locale it registered with (",[746,2202,2203],{},"da-DK"," finds ",[746,2206,2207],{},"da","), else English. ",[746,2210,748],{}," of Notify takes the same for its ",[746,2213,2214],{},"push","\ncontent.",[738,2217,2218,2219,2221],{},"With the ",[746,2220,1299],{}," delivery every device counts as sent. It writes the push title and the user and device ids to the server\nlog, never the body, and warns once when it is active in production, where it almost always means credentials are\nmissing.",[1021,2223,2225],{"id":2224},"sendpush-and-the-driver","sendPush and the driver",[738,2227,2228,2230,2231,1339,2233,2235],{},[746,2229,823],{}," is what Push's Notify driver calls, and Push's own routes (the staff test push) call it directly. Feature code\ncalls ",[746,2232,807],{},[746,2234,748],{}," of Notify, so it does not import from Push and works with any push\ndriver.",[1021,2237,2239],{"id":2238},"devices-of-another-owner","Devices of another owner",[738,2241,2242,2243,2246,2247,2250,2251,2254,2255,2258,2259,2262],{},"A device can belong to something other than a user: a shared phone that another module pairs, such as an SMS gateway\nphone. Its row has no ",[746,2244,2245],{},"userId","; ",[746,2248,2249],{},"ownerType"," names the kind of owner in the owning module's terms (",[746,2252,2253],{},"sms-device",") and\n",[746,2256,2257],{},"ownerId"," the record. ",[746,2260,2261],{},"user"," is not an owner type. These devices never get a user's push, and Push has no routes for\nthem: the owning module exposes its own, checks that the caller may act for the owner, and calls these helpers.",[1026,2264,2266],{"className":1055,"code":2265,"language":1058,"meta":1031,"style":1031},"const owner = { type: 'sms-device', id: 'smd_123' }\nawait registerPushDeviceForOwner(event, owner, { platform: 'android', token, secret, locale: 'da' })\nawait sendPushToOwners(event, { owners: [owner], title: 'New message', body: 'Open the outbox', data: { wake: '1' } })\nawait listPushDevicesOfOwner(owner) \u002F\u002F active devices, newest first\nawait removePushDevicesOfOwner(owner) \u002F\u002F all of them; removePushDevicesOfOwner(owner, deviceId) removes one\n",[746,2267,2268,2309,2366,2439,2452],{"__ignoreMap":1031},[1035,2269,2270,2273,2276,2279,2281,2284,2286,2288,2290,2292,2294,2297,2299,2301,2304,2306],{"class":1037,"line":1038},[1035,2271,2272],{"class":1184},"const",[1035,2274,2275],{"class":1076}," owner ",[1035,2277,2278],{"class":1080},"=",[1035,2280,2028],{"class":1080},[1035,2282,2283],{"class":1087}," type",[1035,2285,1091],{"class":1080},[1035,2287,1107],{"class":1080},[1035,2289,2253],{"class":1045},[1035,2291,1097],{"class":1080},[1035,2293,1104],{"class":1080},[1035,2295,2296],{"class":1087}," id",[1035,2298,1091],{"class":1080},[1035,2300,1107],{"class":1080},[1035,2302,2303],{"class":1045},"smd_123",[1035,2305,1097],{"class":1080},[1035,2307,2308],{"class":1080}," }\n",[1035,2310,2311,2313,2316,2318,2320,2323,2325,2327,2330,2332,2334,2337,2339,2341,2344,2346,2349,2351,2354,2356,2358,2360,2362,2364],{"class":1037,"line":1084},[1035,2312,1964],{"class":1065},[1035,2314,2315],{"class":1072}," registerPushDeviceForOwner",[1035,2317,2098],{"class":1076},[1035,2319,1104],{"class":1080},[1035,2321,2322],{"class":1076}," owner",[1035,2324,1104],{"class":1080},[1035,2326,2028],{"class":1080},[1035,2328,2329],{"class":1087}," platform",[1035,2331,1091],{"class":1080},[1035,2333,1107],{"class":1080},[1035,2335,2336],{"class":1045},"android",[1035,2338,1097],{"class":1080},[1035,2340,1104],{"class":1080},[1035,2342,2343],{"class":1076}," token",[1035,2345,1104],{"class":1080},[1035,2347,2348],{"class":1076}," secret",[1035,2350,1104],{"class":1080},[1035,2352,2353],{"class":1087}," locale",[1035,2355,1091],{"class":1080},[1035,2357,1107],{"class":1080},[1035,2359,2207],{"class":1045},[1035,2361,1097],{"class":1080},[1035,2363,1265],{"class":1080},[1035,2365,1129],{"class":1076},[1035,2367,2368,2370,2373,2375,2377,2379,2382,2384,2387,2389,2391,2393,2395,2398,2400,2402,2404,2406,2408,2411,2413,2415,2417,2419,2421,2424,2426,2428,2431,2433,2435,2437],{"class":1037,"line":1123},[1035,2369,1964],{"class":1065},[1035,2371,2372],{"class":1072}," sendPushToOwners",[1035,2374,2098],{"class":1076},[1035,2376,1104],{"class":1080},[1035,2378,2028],{"class":1080},[1035,2380,2381],{"class":1087}," owners",[1035,2383,1091],{"class":1080},[1035,2385,2386],{"class":1076}," [owner]",[1035,2388,1104],{"class":1080},[1035,2390,1225],{"class":1087},[1035,2392,1091],{"class":1080},[1035,2394,1107],{"class":1080},[1035,2396,2397],{"class":1045},"New message",[1035,2399,1097],{"class":1080},[1035,2401,1104],{"class":1080},[1035,2403,1239],{"class":1087},[1035,2405,1091],{"class":1080},[1035,2407,1107],{"class":1080},[1035,2409,2410],{"class":1045},"Open the outbox",[1035,2412,1097],{"class":1080},[1035,2414,1104],{"class":1080},[1035,2416,2023],{"class":1087},[1035,2418,1091],{"class":1080},[1035,2420,2028],{"class":1080},[1035,2422,2423],{"class":1087}," wake",[1035,2425,1091],{"class":1080},[1035,2427,1107],{"class":1080},[1035,2429,2430],{"class":1045},"1",[1035,2432,1097],{"class":1080},[1035,2434,1265],{"class":1080},[1035,2436,1265],{"class":1080},[1035,2438,1129],{"class":1076},[1035,2440,2441,2443,2446,2449],{"class":1037,"line":1275},[1035,2442,1964],{"class":1065},[1035,2444,2445],{"class":1072}," listPushDevicesOfOwner",[1035,2447,2448],{"class":1076},"(owner) ",[1035,2450,2451],{"class":1119},"\u002F\u002F active devices, newest first\n",[1035,2453,2455,2457,2460,2462],{"class":1037,"line":2454},5,[1035,2456,1964],{"class":1065},[1035,2458,2459],{"class":1072}," removePushDevicesOfOwner",[1035,2461,2448],{"class":1076},[1035,2463,2464],{"class":1119},"\u002F\u002F all of them; removePushDevicesOfOwner(owner, deviceId) removes one\n",[738,2466,2467,2470,2471,2474,2475,2477,2478,2481,2482,881,2485,853,2488,2491,2492,2495,2496,2498,2499,752],{},[746,2468,2469],{},"registerPushDeviceForOwner"," follows the rules of a user's registration: idempotent per owner, bound to the installation\nsecret, moved from another owner or user only with that secret (else ",[746,2472,2473],{},"409 device_owned","), ",[746,2476,1590],{}," removed. It fires\n",[746,2479,2480],{},"push:device:registered"," with ",[746,2483,2484],{},"device.userId",[746,2486,2487],{},"null",[746,2489,2490],{},"device.owner"," set. ",[746,2493,2494],{},"sendPushToOwners"," has the delivery,\nlocale, revocation and failure rules of ",[746,2497,823],{},". Nothing cascades when the owner's record is deleted, so the owning\nmodule calls ",[746,2500,2501],{},"removePushDevicesOfOwner",[777,2503,2505],{"id":2504},"channel-choices","Channel choices",[738,2507,2508,2509,885,2512,2514,2515,2517,2518,2521,2522,752],{},"Push keeps no channel choices. Topics are declared with Notify's ",[746,2510,2511],{},"extendNotificationTopics",[746,2513,748],{}," picks the\nchannels, and ",[742,2516,229],{"href":230}," stores each user's choices and serves the\n",[746,2519,2520],{},"\u002Faccount\u002Fnotifications"," page. See ",[742,2523,2524],{"href":811},"Notifying a user",[777,2526,1645],{"id":2527},"the-mobile-app",[738,2529,2530],{},"Server mode owns the routes. The Capacitor app is a client of them.",[1018,2532,2533,2537,2540,2594,2610,2614,2621,2750,2756,2760,2763,2784,2797,2848,2859,2884,2889,2893,2908,2919,2938,2948,2954,3033],{},[1021,2534,2536],{"id":2535},"install-a-push-plugin","Install a push plugin",[738,2538,2539],{},"Install one of the two, never both:",[1026,2541,2543],{"className":1028,"code":2542,"language":1030,"meta":1031,"style":1031},"# The FCM token on iOS and Android: iOS goes through FCM, which also works from Cloudflare Workers.\npnpm add @capacitor-firebase\u002Fmessaging firebase\n# Or the APNs token on iOS: the server sends to APNs over HTTP\u002F2 (Node only).\npnpm add @capacitor\u002Fpush-notifications\n\nnpx cap sync\n",[746,2544,2545,2550,2562,2567,2576,2582],{"__ignoreMap":1031},[1035,2546,2547],{"class":1037,"line":1038},[1035,2548,2549],{"class":1119},"# The FCM token on iOS and Android: iOS goes through FCM, which also works from Cloudflare Workers.\n",[1035,2551,2552,2554,2556,2559],{"class":1037,"line":1084},[1035,2553,1042],{"class":1041},[1035,2555,1046],{"class":1045},[1035,2557,2558],{"class":1045}," @capacitor-firebase\u002Fmessaging",[1035,2560,2561],{"class":1045}," firebase\n",[1035,2563,2564],{"class":1037,"line":1123},[1035,2565,2566],{"class":1119},"# Or the APNs token on iOS: the server sends to APNs over HTTP\u002F2 (Node only).\n",[1035,2568,2569,2571,2573],{"class":1037,"line":1275},[1035,2570,1042],{"class":1041},[1035,2572,1046],{"class":1045},[1035,2574,2575],{"class":1045}," @capacitor\u002Fpush-notifications\n",[1035,2577,2578],{"class":1037,"line":2454},[1035,2579,2581],{"emptyLinePlaceholder":2580},true,"\n",[1035,2583,2585,2588,2591],{"class":1037,"line":2584},6,[1035,2586,2587],{"class":1041},"npx",[1035,2589,2590],{"class":1045}," cap",[1035,2592,2593],{"class":1045}," sync\n",[738,2595,2596,2599,2600,2602,2603,2606,2607,2609],{},[746,2597,2598],{},"firebase"," is the web SDK that ",[746,2601,906],{}," imports for its web fallback. Push imports the plugin\nitself, only when it is installed, so a build without one still works. Without one ",[746,2604,2605],{},"usePushDevice().supported"," is\n",[746,2608,1913],{},". When both are installed Push uses Firebase Messaging and warns at build time: the Firebase plugin must not run\nnext to another push plugin.",[1021,2611,2613],{"id":2612},"ask-for-the-scope","Ask for the scope",[738,2615,2616,2617,2620],{},"A bearer token reaches the device routes only with the ",[746,2618,2619],{},"push:devices"," permission, so the app asks for it as a scope:",[1026,2622,2625],{"className":1055,"code":2623,"filename":2624,"language":1058,"meta":1031,"style":1031},"export default defineNuxtConfig({\n  modules: ['@frigear-nu\u002Fmobile', '@frigear-nu\u002Fpush'],\n  authentication: {\n    mode: 'client',\n    client: {\n      scopes: ['openid', 'push:devices'], \u002F\u002F plus the scopes the rest of the app asks for\n    },\n  },\n})\n","nuxt.config.ts of the app",[746,2626,2627,2639,2666,2675,2691,2700,2731,2737,2743],{"__ignoreMap":1031},[1035,2628,2629,2631,2633,2635,2637],{"class":1037,"line":1038},[1035,2630,1066],{"class":1065},[1035,2632,1069],{"class":1065},[1035,2634,1073],{"class":1072},[1035,2636,1077],{"class":1076},[1035,2638,1081],{"class":1080},[1035,2640,2641,2643,2645,2647,2649,2652,2654,2656,2658,2660,2662,2664],{"class":1037,"line":1084},[1035,2642,1088],{"class":1087},[1035,2644,1091],{"class":1080},[1035,2646,1094],{"class":1076},[1035,2648,1097],{"class":1080},[1035,2650,2651],{"class":1045},"@frigear-nu\u002Fmobile",[1035,2653,1097],{"class":1080},[1035,2655,1104],{"class":1080},[1035,2657,1107],{"class":1080},[1035,2659,758],{"class":1045},[1035,2661,1097],{"class":1080},[1035,2663,1114],{"class":1076},[1035,2665,888],{"class":1080},[1035,2667,2668,2671,2673],{"class":1037,"line":1123},[1035,2669,2670],{"class":1087},"  authentication",[1035,2672,1091],{"class":1080},[1035,2674,1194],{"class":1080},[1035,2676,2677,2680,2682,2684,2687,2689],{"class":1037,"line":1275},[1035,2678,2679],{"class":1087},"    mode",[1035,2681,1091],{"class":1080},[1035,2683,1107],{"class":1080},[1035,2685,2686],{"class":1045},"client",[1035,2688,1097],{"class":1080},[1035,2690,888],{"class":1080},[1035,2692,2693,2696,2698],{"class":1037,"line":2454},[1035,2694,2695],{"class":1087},"    client",[1035,2697,1091],{"class":1080},[1035,2699,1194],{"class":1080},[1035,2701,2702,2705,2707,2709,2711,2714,2716,2718,2720,2722,2724,2726,2728],{"class":1037,"line":2584},[1035,2703,2704],{"class":1087},"      scopes",[1035,2706,1091],{"class":1080},[1035,2708,1094],{"class":1076},[1035,2710,1097],{"class":1080},[1035,2712,2713],{"class":1045},"openid",[1035,2715,1097],{"class":1080},[1035,2717,1104],{"class":1080},[1035,2719,1107],{"class":1080},[1035,2721,2619],{"class":1045},[1035,2723,1097],{"class":1080},[1035,2725,1114],{"class":1076},[1035,2727,1104],{"class":1080},[1035,2729,2730],{"class":1119}," \u002F\u002F plus the scopes the rest of the app asks for\n",[1035,2732,2734],{"class":1037,"line":2733},7,[1035,2735,2736],{"class":1080},"    },\n",[1035,2738,2740],{"class":1037,"line":2739},8,[1035,2741,2742],{"class":1080},"  },\n",[1035,2744,2746,2748],{"class":1037,"line":2745},9,[1035,2747,1126],{"class":1080},[1035,2749,1129],{"class":1076},[738,2751,2752,2753,752],{},"The issuer and the API need Push in server mode, so the scope exists there. A token without it gets\n",[746,2754,2755],{},"403 insufficient_scope",[1021,2757,2759],{"id":2758},"set-up-firebase-and-apple","Set up Firebase and Apple",[738,2761,2762],{},"Both plugins:",[782,2764,2765,2778],{},[785,2766,2767,2770,2771,2774,2775,752],{},[788,2768,2769],{},"Android:"," add your Firebase project's ",[746,2772,2773],{},"google-services.json"," to ",[746,2776,2777],{},"android\u002Fapp",[785,2779,2780,2783],{},[788,2781,2782],{},"iOS:"," in Xcode, add the Push Notifications capability to the app target.",[738,2785,2786,2787,2789,2790,2796],{},"With ",[746,2788,906],{}," (the plugin's\n",[742,2791,2795],{"href":2792,"rel":2793},"https:\u002F\u002Fgithub.com\u002Fcapawesome-team\u002Fcapacitor-firebase\u002Ftree\u002Fmain\u002Fpackages\u002Fmessaging",[2794],"nofollow","setup guide"," has the details):",[782,2798,2799,2826,2834],{},[785,2800,2801,2803,2804,2774,2807,2810,2811,885,2814,2817,2818,2821,2822,2825],{},[788,2802,2782],{}," add the iOS app to the Firebase project and its ",[746,2805,2806],{},"GoogleService-Info.plist",[746,2808,2809],{},"ios\u002FApp\u002FApp"," in Xcode. Add the\n",[746,2812,2813],{},"didRegisterForRemoteNotificationsWithDeviceToken",[746,2815,2816],{},"didFailToRegisterForRemoteNotificationsWithError"," and\n",[746,2819,2820],{},"didReceiveRemoteNotification"," handlers the guide lists to ",[746,2823,2824],{},"AppDelegate.swift",": they hand the APNs token to Firebase,\nwhich swaps it for the FCM token.",[785,2827,2828,2830,2831,2833],{},[788,2829,1605],{}," (",[742,2832,774],{"href":773},"). Without it FCM accepts the token but cannot\ndeliver to the phone.",[785,2835,2836,2837,2840,2841,2844,2845,752],{},"To show a notification while the app is open on iOS, set ",[746,2838,2839],{},"plugins.FirebaseMessaging.presentationOptions"," (for example\n",[746,2842,2843],{},"['badge', 'sound', 'alert']",") in ",[746,2846,2847],{},"capacitor.config",[738,2849,2786,2850,2852,2853,2858],{},[746,2851,910],{}," (the ",[742,2854,2857],{"href":2855,"rel":2856},"https:\u002F\u002Fcapacitorjs.com\u002Fdocs\u002Fapis\u002Fpush-notifications",[2794],"Capacitor guide","):",[782,2860,2861,2876],{},[785,2862,2863,2865,2866,2868,2869,2872,2873,775],{},[788,2864,2782],{}," create an APNs authentication key in the Apple developer account and set the four ",[746,2867,1474],{},"\nvariables on the server. Use ",[746,2870,2871],{},"NUXT_PUSH_APNS_SANDBOX=true"," for builds installed from Xcode. The server must run on\nNode (",[742,2874,1666],{"href":2875},"#apns-needs-http2",[785,2877,2836,2878,2881,2882,752],{},[746,2879,2880],{},"plugins.PushNotifications.presentationOptions"," in\n",[746,2883,2847],{},[738,2885,2886,2887,775],{},"Firebase Messaging returns the FCM token on both platforms. The Capacitor plugin returns the FCM token on Android and the\nAPNs device token on iOS. Push sends the token together with the provider that issued it, which decides where the\nserver sends (",[742,2888,1373],{"href":1372},[1021,2890,2892],{"id":2891},"register-and-unregister","Register and unregister",[738,2894,2786,2895,2897,2898,2901,2902,2904,2905,2907],{},[746,2896,2651],{}," installed, a plugin registers the device whenever someone is signed in: after a sign-in and when\na stored session is restored at start. It asks for permission, registers with the OS and sends the token to\n",[746,2899,2900],{},"POST \u002Fapi\u002Fpush\u002Fme\u002Fdevices",". Registering the same token again is harmless. It remembers the token it registered last,\nand when the OS hands out another one (a rotated token, or the FCM token after a switch from\n",[746,2903,910],{},") it sends the old one as ",[746,2906,1590],{},", so the server drops it.",[738,2909,2910,2911,2914,2915,2918],{},"The first time, it also generates the ",[788,2912,2913],{},"installation secret",": 32 random bytes, kept in the app's local storage\n(",[746,2916,2917],{},"frigear-push-installation",") for as long as the app is installed. It goes with every registration and unregistration.\nThe server stores only its SHA-256 hash, next to the token, and uses it to tell the installation apart from somebody\nwho merely knows the token:",[782,2920,2921,2927,2930],{},[785,2922,2923,2924,2926],{},"A token registered to another user moves to the caller only with the same secret: the phone changed hands and the\nnext person signed in on it. Anyone else gets ",[746,2925,2473],{},", and the device stays where it was.",[785,2928,2929],{},"The same user registering the same token again is fine, with or without the secret.",[785,2931,2932,853,2934,2937],{},[746,2933,1590],{},[746,2935,2936],{},"POST \u002Fapi\u002Fpush\u002Fme\u002Fdevices\u002Funregister"," need the secret, and only remove the caller's device bound to\nthat secret (or to none: a device registered without one).",[738,2939,2940,2941,2944,2945,752],{},"Your own client (without ",[746,2942,2943],{},"usePushDevice",") generates a secret of at least 16 characters once per installation, keeps it,\nand sends it as ",[746,2946,2947],{},"secret",[738,2949,1656,2950,2953],{},[746,2951,2952],{},"push.settings.autoRegister: false"," to ask at a better moment, and call it yourself:",[1026,2955,2957],{"className":1055,"code":2956,"language":1058,"meta":1031,"style":1031},"const push = usePushDevice()\npush.supported       \u002F\u002F a native app with a push plugin installed\npush.permission      \u002F\u002F 'unknown' | 'unsupported' | 'prompt' | 'granted' | 'denied'\nawait push.register()   \u002F\u002F asks for permission when needed, resolves false without it\nawait push.unregister() \u002F\u002F removes this device on the server and forgets the token\n",[746,2958,2959,2974,2986,2998,3016],{"__ignoreMap":1031},[1035,2960,2961,2963,2966,2968,2971],{"class":1037,"line":1038},[1035,2962,2272],{"class":1184},[1035,2964,2965],{"class":1076}," push ",[1035,2967,2278],{"class":1080},[1035,2969,2970],{"class":1072}," usePushDevice",[1035,2972,2973],{"class":1076},"()\n",[1035,2975,2976,2978,2980,2983],{"class":1037,"line":1084},[1035,2977,2214],{"class":1076},[1035,2979,752],{"class":1080},[1035,2981,2982],{"class":1076},"supported       ",[1035,2984,2985],{"class":1119},"\u002F\u002F a native app with a push plugin installed\n",[1035,2987,2988,2990,2992,2995],{"class":1037,"line":1123},[1035,2989,2214],{"class":1076},[1035,2991,752],{"class":1080},[1035,2993,2994],{"class":1076},"permission      ",[1035,2996,2997],{"class":1119},"\u002F\u002F 'unknown' | 'unsupported' | 'prompt' | 'granted' | 'denied'\n",[1035,2999,3000,3002,3005,3007,3010,3013],{"class":1037,"line":1275},[1035,3001,1964],{"class":1065},[1035,3003,3004],{"class":1076}," push",[1035,3006,752],{"class":1080},[1035,3008,3009],{"class":1072},"register",[1035,3011,3012],{"class":1076},"()   ",[1035,3014,3015],{"class":1119},"\u002F\u002F asks for permission when needed, resolves false without it\n",[1035,3017,3018,3020,3022,3024,3027,3030],{"class":1037,"line":2454},[1035,3019,1964],{"class":1065},[1035,3021,3004],{"class":1076},[1035,3023,752],{"class":1080},[1035,3025,3026],{"class":1072},"unregister",[1035,3028,3029],{"class":1076},"() ",[1035,3031,3032],{"class":1119},"\u002F\u002F removes this device on the server and forgets the token\n",[1131,3034,3035,3036,881,3039,881,3042,3045,3046,3048],{},"Call ",[746,3037,3038],{},"unregister()",[788,3040,3041],{},"before",[746,3043,3044],{},"useAuth().logout()",". The server removes the device with the signed-in user's token, which\nis gone once the logout is done: the call then answers ",[746,3047,1791],{}," and the phone stays registered to the previous user. A\nphone that is registered by someone else later moves to them (the app sends the same installation secret), but until\nthen it would still receive the previous user's notifications.",[738,3050,3051],{},"Push does not send web push to a website (a service worker).",[777,3053,834],{"id":3054},"account-page",[738,3056,3057,3059,3060,3063],{},[746,3058,837],{}," lists the signed-in user's active devices: the platform, the provider (FCM or APNs), when each was\nlast seen and when it was registered. Remove device asks for confirmation and calls\n",[746,3061,3062],{},"DELETE \u002Fapi\u002Fpush\u002Fme\u002Fdevices\u002F:id",". A removed phone is registered again the next time someone signs in to the app on it\nwith notifications allowed.",[738,3065,3066,3067,3069,3070,3072,3073,752],{},"Removing needs ",[746,3068,2619],{},", like registering, so the app's token with the ",[746,3071,2214],{}," scope can remove devices too. It is\nnot session only: the app signs out with that token through ",[746,3074,2936],{},[777,3076,849],{"id":3077},"admin-tab",[738,3079,3080,3081,3083,3084,3087,3088,3091],{},"The Devices tab on the admin user page lists the user's devices, revoked ones included, with the provider each one's\npushes go to (FCM or APNs; Server default for an iOS device registered before providers were stored, which follows\n",[746,3082,1355],{},"), and has a Send test push action\nthat calls ",[746,3085,3086],{},"POST \u002Fapi\u002Fadmin\u002Fpush\u002Ftest",". The action only shows for staff who hold ",[746,3089,3090],{},"push:send",", and the test text follows\neach device's language.",[777,3093,3095],{"id":3094},"routes","Routes",[738,3097,3098,3099,3102,3103,752],{},"Typed builders for every URL are in ",[746,3100,3101],{},"pushApi"," from ",[746,3104,3105],{},"@frigear-nu\u002Fpush\u002Fapi",[950,3107,3108,3119],{},[953,3109,3110],{},[956,3111,3112,3115,3117],{},[959,3113,3114],{},"Route",[959,3116,1001],{},[959,3118,1858],{},[968,3120,3121,3135,3188,3207,3226,3241],{},[956,3122,3123,3128,3132],{},[973,3124,3125],{},[746,3126,3127],{},"GET \u002Fapi\u002Fpush\u002Fme\u002Fdevices",[973,3129,3130],{},[746,3131,2619],{},[973,3133,3134],{},"The caller's active devices, newest first.",[956,3136,3137,3141,3145],{},[973,3138,3139],{},[746,3140,2900],{},[973,3142,3143],{},[746,3144,2619],{},[973,3146,3147,3148,1754,3151,3153,3154,3156,3157,1339,3159,2830,3161,3163,3164,3167,3168,3170,3171,3173,3174,3176,3177,3167,3179,3181,3182,3184,3185,752],{},"Registers a device: ",[746,3149,3150],{},"{ platform, token, secret?, provider?, replaces?, appId?, locale? }",[746,3152,2947],{}," is the installation secret (16 to 256 characters). ",[746,3155,1368],{}," is ",[746,3158,1364],{},[746,3160,1360],{},[746,3162,1360],{}," on Android is a ",[746,3165,3166],{},"400","). ",[746,3169,1590],{}," is the token this installation registered before: the caller's device with it and the same secret is removed (",[746,3172,1590],{}," without ",[746,3175,2947],{}," is a ",[746,3178,3166],{},[746,3180,2473],{}," when the token is another user's and ",[746,3183,2947],{}," does not match. Answers ",[746,3186,3187],{},"201",[956,3189,3190,3194,3198],{},[973,3191,3192],{},[746,3193,3062],{},[973,3195,3196],{},[746,3197,2619],{},[973,3199,3200,3201,3204,3205,752],{},"Removes one of the caller's devices (",[746,3202,3203],{},"204","). Another user's device answers ",[746,3206,1738],{},[956,3208,3209,3213,3217],{},[973,3210,3211],{},[746,3212,2936],{},[973,3214,3215],{},[746,3216,2619],{},[973,3218,3219,3220,2830,3223,3225],{},"Removes the caller's device by ",[746,3221,3222],{},"{ token, secret }",[746,3224,3203],{},"), also when it is unknown, another user's or bound to another secret (then nothing is removed).",[956,3227,3228,3233,3238],{},[973,3229,3230],{},[746,3231,3232],{},"GET \u002Fapi\u002Fadmin\u002Fusers\u002F:id\u002Fpush-devices",[973,3234,3235],{},[746,3236,3237],{},"push:manage",[973,3239,3240],{},"A user's devices, revoked ones included.",[956,3242,3243,3247,3251],{},[973,3244,3245],{},[746,3246,3086],{},[973,3248,3249],{},[746,3250,3090],{},[973,3252,3253,3254,3257,3258,752],{},"Sends a test push to ",[746,3255,3256],{},"{ userId }"," and answers ",[746,3259,3260],{},"{ sent, failed, revoked }",[738,3262,3263],{},"A token is never part of a device in a response.",[738,3265,3266,3267,3270],{},"Registering a token the caller already has makes it active again. A token registered to another user moves to the\ncaller only with the installation secret it is bound to (see ",[742,3268,2892],{"href":3269},"#register-and-unregister","): a\nphone that changes hands belongs to whoever signed in last on it, and knowing a token is not enough to take it.",[777,3272,3274],{"id":3273},"permissions-and-scopes","Permissions and scopes",[950,3276,3277,3290],{},[953,3278,3279],{},[956,3280,3281,3284,3287],{},[959,3282,3283],{},"Permission",[959,3285,3286],{},"Who",[959,3288,3289],{},"What it allows",[968,3291,3292,3304,3320],{},[956,3293,3294,3298,3301],{},[973,3295,3296],{},[746,3297,2619],{},[973,3299,3300],{},"every signed-in user",[973,3302,3303],{},"Their own devices. A policy keeps it to the user's own devices.",[956,3305,3306,3310,3317],{},[973,3307,3308],{},[746,3309,3237],{},[973,3311,3312,3313,3316],{},"the ",[746,3314,3315],{},"admin"," role",[973,3318,3319],{},"See other users' devices.",[956,3321,3322,3326,3330],{},[973,3323,3324],{},[746,3325,3090],{},[973,3327,3312,3328,3316],{},[746,3329,3315],{},[973,3331,3332],{},"Send a test push.",[738,3334,1429,3335,3337,3338,3340,3341,3344,3345,752],{},[746,3336,2214],{}," scope holds ",[746,3339,2619],{},". Use it, or the permission itself, in a token or in ",[746,3342,3343],{},"authentication.client.scopes",".\nSee ",[742,3346,3347],{"href":72},"Auth and scopes",[777,3349,242],{"id":3350},"hooks",[950,3352,3353,3366],{},[953,3354,3355],{},[956,3356,3357,3360,3363],{},[959,3358,3359],{},"Hook",[959,3361,3362],{},"Context",[959,3364,3365],{},"When",[968,3367,3368],{},[956,3369,3370,3374,3379],{},[973,3371,3372],{},[746,3373,2480],{},[973,3375,3376],{},[746,3377,3378],{},"{ event, device }",[973,3380,3381,3382,3385,3386,3156,3388,3390,3391,775],{},"A device registered or registered again, after it is stored. ",[746,3383,3384],{},"device"," has no token; ",[746,3387,2484],{},[746,3389,2487],{}," for a device of another owner (",[746,3392,2490],{},[777,3394,3396],{"id":3395},"next-steps","Next steps",[782,3398,3399,3409,3414,3419],{},[785,3400,3401,3403,3404,885,3406,3408],{},[742,3402,356],{"href":357}," – ",[746,3405,807],{},[746,3407,748],{}," and the topic registry.",[785,3410,3411,3413],{},[742,3412,229],{"href":230}," – where users choose their channels per topic.",[785,3415,3416,3418],{},[742,3417,438],{"href":439}," – the Capacitor app that registers devices.",[785,3420,3421,3424],{},[742,3422,532],{"href":3423},"\u002Fmodules\u002Fvolunteering\u002Fshifts#push-and-notify-topics"," – a module that sends reminders and swaps on its topics.",[3426,3427,3428],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":1031,"searchDepth":1084,"depth":1084,"links":3430},[3431,3432,3433,3438,3444,3445,3451,3452,3458,3459,3460,3461,3462,3463],{"id":779,"depth":1084,"text":780},{"id":938,"depth":1084,"text":939},{"id":1015,"depth":1084,"text":1016,"children":3434},[3435,3436,3437],{"id":1023,"depth":1123,"text":1024},{"id":1144,"depth":1123,"text":1145},{"id":1160,"depth":1123,"text":1161},{"id":1303,"depth":1084,"text":1304,"children":3439},[3440,3441,3442,3443],{"id":1503,"depth":1123,"text":1373},{"id":1594,"depth":1123,"text":774},{"id":1665,"depth":1123,"text":1666},{"id":1706,"depth":1123,"text":1707},{"id":1839,"depth":1084,"text":1840},{"id":1948,"depth":1084,"text":1891,"children":3446},[3447,3448,3449,3450],{"id":1951,"depth":1123,"text":807},{"id":2086,"depth":1123,"text":823},{"id":2224,"depth":1123,"text":2225},{"id":2238,"depth":1123,"text":2239},{"id":2504,"depth":1084,"text":2505},{"id":2527,"depth":1084,"text":1645,"children":3453},[3454,3455,3456,3457],{"id":2535,"depth":1123,"text":2536},{"id":2612,"depth":1123,"text":2613},{"id":2758,"depth":1123,"text":2759},{"id":2891,"depth":1123,"text":2892},{"id":3054,"depth":1084,"text":834},{"id":3077,"depth":1084,"text":849},{"id":3094,"depth":1084,"text":3095},{"id":3273,"depth":1084,"text":3274},{"id":3350,"depth":1084,"text":242},{"id":3395,"depth":1084,"text":3396},"Register phones and deliver push notifications to them, as the push driver of Notify.","md",null,{},{"title":377,"description":3464},"gYL9a9TC1LGe8_ZQ-_ERhH2IIOcYU8RtiIz9Hoiv0Tw",[3471,3473],{"title":373,"path":374,"stem":375,"description":3472,"children":-1},"How a module ships an email template, and how your app replaces it with a file of the same name.",{"title":381,"path":382,"stem":383,"description":3474,"children":-1},"Shared support inboxes. Staff read and answer messages from the contact form, email, WhatsApp, Messenger and Instagram in one place.",1796157344410]