Please provide the following:
SDK Version: 47
Platforms(Android/iOS/web/all): android/ios
Hello there,
I am looking on internet how to make a custom proxy to remove the native popup IOS when we signup or signin.
Our customers drop at this native popup (we think because of “expo.io ” so, we need to make it more “normal” (with our domain)
I am using https://clerk.dev/ but it’s similar to auth0
It seems to be a bit complicated to avoid using
const result = await AuthSession.startAsync({
authUrl: externalVerificationRedirectURL.toString(),
returnUrl: redirectUrl,
})
And using
const [request, response, promptAsync] = useAuthRequest({ ... }, { ... });
Do you have an idea how I can do that ?
I guess I need to do my own auth proxy.
Do I need something like that Configure Google Cloud Platform with Load Balancing as Reverse Proxy ?
Thanks for your help
I think I found what I was looking for !
1 Like
I succeeded to make it work but I had to make a patch-package because startAsync
always add the expo proxy.
Should it be possible to add our own proxy with an option ?
diff --git a/node_modules/expo-auth-session/build/AuthSession.js b/node_modules/expo-auth-session/build/AuthSession.js
index 9a58a22..44cb66f 100644
--- a/node_modules/expo-auth-session/build/AuthSession.js
+++ b/node_modules/expo-auth-session/build/AuthSession.js
@@ -32,7 +32,8 @@ export async function startAsync(options) {
return { type: 'locked' };
}
const returnUrl = options.returnUrl || sessionUrlProvider.getDefaultReturnUrl();
- const startUrl = sessionUrlProvider.getStartUrl(authUrl, returnUrl, options.projectNameForProxy);
+ // const startUrl = sessionUrlProvider.getStartUrl(authUrl, returnUrl, options.projectNameForProxy);
+ const startUrl = authUrl
const showInRecents = options.showInRecents || false;
// About to start session, set lock
_authLock = true;
Result
const authServiceUrl = encodeURIComponent(
externalVerificationRedirectURL.toString()
) // we encode this, because it will be send as a query parameter
const authServiceUrlParameter = `authServiceUrl=${authServiceUrl}`
// const authUrl = `http://mindday.com/api/oauth-proxy/start?${authServiceUrlParameter}`
const authUrl = `http://0.0.0.0:3000/api/oauth-proxy/start?${authServiceUrlParameter}`
const result = await AuthSession.startAsync({
authUrl: authUrl,
returnUrl: redirectUrl,
})
system
Closed
February 19, 2023, 5:35pm
4
This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.