Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to use next-auth authentication providers for other third party application

I recently found next-auth for authenticating nextjs applications. For authentication of my foobar next js application I use providers like google, facebook, twitter or etc provided by next-auth and it is ok but one thing that I want to know is how to authenticate using same providers - google, facebook, twitter or etc- on other applications? As an example my foobar nextjs web application has Google sign in and Facebook sign in. If I want to develop mobile application using react native or flutter how to handle Google sign in or Facebook sign in to be authenticated by next-auth api endpoints?

like image 274
Mahdi-Jafaree Avatar asked Oct 28 '25 14:10

Mahdi-Jafaree


1 Answers

NextAuth is specifically built for next.js applications. If you want your users to sign-in with OAuth providers like Google, Facebook, etc. in your react native or flutter applications, you'd have to use another oauth solution.

This is a very common thing to do though and those providers might even have SDK's or tutorials in their docs.

For example, a quick google resulted in the following promising looking alternatives:

  • react native - https://github.com/FormidableLabs/react-native-app-auth
  • flutter - https://fusionauth.io/blog/2020/11/23/securing-flutter-oauth/ (using AppAuth)
like image 175
ndom91 Avatar answered Oct 30 '25 05:10

ndom91



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!