Is there any examples for how to do authentication with Expo (Expo router v2)

That handles login/register/email confirm callback
10 Replies
Olyno
Olyno2y ago
DEV Community
Expo Router V2 - Authentication Flow with Appwrite
This blog post is a complimentary resource to support the video on Expo Router v2 In the video, I...
Jasper
JasperOP2y ago
hey @Olyno thanks for the info, i managed to get a bit working using the flowType pkce But supabase-js throws an warning about WebCrypto, (the app does work tho)
WebCrypto API is not supported.
WebCrypto API is not supported.
Is there a way to disable that?
Olyno
Olyno2y ago
You would need a polyfill for that
Jasper
JasperOP2y ago
Do you know any? expo-standard-crypto didn't work got more errors about functions not being found (js errors)
Olyno
Olyno2y ago
Honestly, i don't know any polyfill for that :/ I come back to you if i find any
Jasper
JasperOP2y ago
Thanks Authentication is a mess with react native The default flow puts the tokens in the hash of the url and you can't access those properly in react native
chaoky
chaoky2y ago
you can if you're using react navigation without expo router
chaoky
chaoky2y ago
Configuring links | React Navigation
In this guide, we will configure React Navigation to handle external links. This is necessary if you want to:
chaoky
chaoky2y ago
you can then call auth.setSession directly with the acess and refresh tokens you can also grab the unparsed url with Linking.getInitialURL and extract the tokens from there, this solution works with expo router too

Did you find this page helpful?