Changing the value on a live app breaks every login flow built on the old one. Redirect URIs registered with your OAuth providers and any callback page holding a hardcoded fallback stop resolving until both sides are updated.
Installation
- Bundle
- CDN
How it works
The scheme is compiled into the native binary, so the operating system can route to your app before your web layer has loaded. Your callback page runs inside the authentication session, not in your app, and fires a link using your scheme once it holds the tokens./auth?access_token=xxx. Everything after oauth/ becomes the destination path and the query string is preserved untouched. Without the oauth/ prefix the session stays open and the user is stranded on the provider screen.
Choosing a compliant scheme
The default is derived from your app name, which is fine for most apps and a problem for the rest. App names containing spaces, punctuation, accented characters, or a leading digit produce a value the operating system will not register, and App Store Connect flags the malformed entry at submission rather than at build time.Setting a custom scheme
Open the app settings
In the Despia Editor, go to Despia > App > Settings > Dynamic App Source.
Edit the URL Scheme field
Enter the value on its own, with no
:// suffix and no path. Entering myapp registers myapp://.Update your OAuth configuration
Redirect URIs in every provider dashboard, and the
deeplink_scheme fallback your callback page uses when state carries nothing.Rebuild and install
Trigger a new native build and install it on a device before testing any login.
Opening the authentication session
Social login opens the provider in ASWebAuthenticationSession on iOS and Chrome Custom Tabs on Android. Both are isolated from your WebView by design, which is what makes the return link necessary in the first place.Carrying the scheme through state
Hardcoding the scheme in a callback page is the most common reason a working login breaks after a rename. The callback has no access to the Despia context that opened it, so pass the value through the OAuthstate parameter, which providers echo back unchanged.
: is the only place the scheme is still written literally, so it is the one line to update when you change the value.
Changing the scheme on a live app
A build registers one scheme, so old and new cannot both resolve during a rollout. Users on the previous binary keep answering to the old value until they update, which means every provider has to accept both while adoption catches up.
The cheapest time to fix a malformed scheme is before the first submission. If your app is already live, treat the change as a coordinated release rather than a settings tweak.
Resources
NPM Package
despia-native
OAuth Introduction
The full native authentication flow end to end
Deeplinking
Universal links and app links for HTTPS URLs from your own domain