-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
112 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
- Adding URL scheme to `app.json` | ||
|
||
To allow the Expo-based SDK to work with exported Expo Android apps, you need to add the designated scheme into `app.json` | ||
|
||
```json title="app.json" | ||
{ | ||
"expo": { | ||
"scheme": "web3authexpoexample" // replace with your own scheme | ||
} | ||
} | ||
``` | ||
|
||
- For constructing your `redirectUrl`, you'll need to use the `expo-linking`, which will help you generate a `redirectUrl` for your app. Make sure you | ||
register that URL in the [Web3Auth Developer Dashboard](https://dashboard.web3auth.io). | ||
|
||
```tsx title="App.js" | ||
import Constants, { AppOwnership } from "expo-constants"; | ||
import * as Linking from "expo-linking"; | ||
|
||
const resolvedRedirectUrl = | ||
Constants.appOwnership == AppOwnership.Expo || Constants.appOwnership == AppOwnership.Guest | ||
? Linking.createURL("web3auth", {}) | ||
: Linking.createURL("web3auth", { scheme: scheme }); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.