Has anyone figured out how to wire Auth0 or AWS Co...
# compose-ios
v
Has anyone figured out how to wire Auth0 or AWS Cognito authentication into a compose project yet? I know I can extract the auth functionality into a backend service (I did that for Cognito already) but really want to avoid doing that if I can. Any thoughts? Suggestions? Regrets? 🙂
👍 1
r
I've been using cognito idp multiplatform https://github.com/Liftric/cognito-idp If you need oauth you'll need to do a lot more expect/actual stuff for each platform. The gotrue auth module of this supabase client has a good set of examples for each platform of how to setup oauth https://github.com/supabase-community/supabase-kt
d
The best way is to use kotlinx.coroutines for network requests
âś… 1
k
We are also using https://github.com/Liftric/cognito-idp, it works very well
We use Ktor for all of our http networking, and are integrating cognito authentication as a Ktor client
Auth
plugin
There’s nothing “compose” about this though, as expected 🙂
v
I’ll give Liftric’s implementation a go today…hopefully it’ll work. I also created this backend service a while back (6 years ago) that extracts Cognito completely from the UI, but would have to use it since it would require additional “refresh” logic to be implemented. Sharing it in case someone finds it useful: https://github.com/awslabs/cognito-proxy-rest-service