Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions examples/expo/.well-known/apple-app-site-association.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"webcredentials": {
"apps": ["<TEAM_ID>.<BUNDLE_ID>"]
}
}
13 changes: 13 additions & 0 deletions examples/expo/.well-known/assetlinks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[
{
"relation": [
"delegate_permission/common.handle_all_urls",
"delegate_permission/common.get_login_creds"
],
"target": {
"namespace": "android_app",
"package_name": "<your.package.name>",
"sha256_cert_fingerprints": ["<SHA256>"]
}
}
]
5 changes: 5 additions & 0 deletions examples/nextjs/src/lib/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ export const walletConfig: WalletConfig = {
factoryAddress: network.factoryContractId,
rpcUrl: network.rpcUrl,
networkPassphrase: network.networkPassphrase,
// Allow the relying-party id and origin to be explicitly configured via
// environment variables (NEXT_PUBLIC_RP_ID / NEXT_PUBLIC_ORIGIN). This is
// necessary for native builds where window.location is not available.
rpId: process.env.NEXT_PUBLIC_RP_ID?.trim() || undefined,
origin: process.env.NEXT_PUBLIC_ORIGIN?.trim() || undefined,
}

export function getNativeAssetContractId(): string {
Expand Down
24 changes: 24 additions & 0 deletions frontend/mobile/app.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
const pkg = require('./package.json');

/**
* Expo dynamic config: wires iOS associatedDomains from EXPO_PUBLIC_PASSKEY_RP_ID.
*
* If EXPO_PUBLIC_PASSKEY_RP_ID is set (e.g. veil.app or your-domain.com), an
* associatedDomains entry of the form `webcredentials:<rp-id>` will be injected
* into the generated iOS build config so passkey / credential sharing works.
*/
module.exports = () => {
const rpId = process.env.EXPO_PUBLIC_PASSKEY_RP_ID || undefined;

return {
expo: {
name: pkg.name || 'veil-mobile',
slug: pkg.name || 'veil-mobile',
version: pkg.version || '0.1.0',
ios: {
// Only include the associatedDomains section when an rp-id is configured
associatedDomains: rpId ? [`webcredentials:${rpId}`] : undefined,
},
},
};
};
2 changes: 1 addition & 1 deletion frontend/mobile/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
],
"paths": {
"@/*": [
"./app/*"
"./*"
],
"@/assets/*": [
"./assets/*"
Expand Down
5 changes: 5 additions & 0 deletions frontend/wallet/lib/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ export const walletConfig: WalletConfig = {
factoryAddress: getNetwork().factoryContractId,
rpcUrl: getNetwork().rpcUrl,
networkPassphrase: getNetwork().networkPassphrase,
// Explicit rpId and origin allow native (Expo / React Native) builds to
// provide the relying-party id and origin via environment variables.
// When unset, the SDK falls back to window.location.hostname / origin.
rpId: process.env.NEXT_PUBLIC_RP_ID?.trim() || undefined,
origin: process.env.NEXT_PUBLIC_ORIGIN?.trim() || undefined,
}

export function getNativeAssetContractId(): string {
Expand Down