10000 🚀 Feature: Add google authentication feature for react native apps · Issue #6341 · appwrite/appwrite · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

🚀 Feature: Add google authentication feature for react native apps #6341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 tasks done
SMARTMICROWORLD opened this issue Sep 27, 2023 · 7 comments
Closed
2 tasks done
Assignees
Labels
product / auth Fixes and upgrades for the Appwrite Auth / Users / Teams services.

Comments

@SMARTMICROWORLD
Copy link

🔖 Feature description

I was going to migrate my database from firebase to appwrite but I was unable to authenticate users like firebase google-signin.

🎤 Pitch

It is very useful for us react native app developers and also for appwrite platform because in this fast lifestyle no one want to fill the forms to register in an app. So implementing this feature will be booster dose for Appwrite.
Thanks

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@stnguyen90 stnguyen90 added the product / auth Fixes and upgrades for the Appwrite Auth / Users / Teams services. label Sep 27, 2023
@stnguyen90 stnguyen90 self-assigned this Sep 27, 2023
@stnguyen90
Copy link
Contributor

@SMARTMICROWORLD, thanks for raising this issue! 🙏🏼 Appwrite supports dozens of OAuth2 providers including Google:

image

The only problem right now is the Appwrite web sdk uses window.location.href to redirect the user to the OAuth2 provider to authenticate, but I don't think React Native supports that. So, as a workaround, you can manually build the URL yourself just like the SDK does and then send the user to that URL with whatever way React Native supports. Just make sure to set a success and failure URL that will redirect the user back into the app.

@SMARTMICROWORLD
Copy link
Author

@SMARTMICROWORLD, thanks for raising this issue! 🙏🏼 Appwrite supports dozens of OAuth2 providers including Google:

image The only problem right now is the [Appwrite web sdk](https://github.com/appwrite/sdk-for-web) uses [`window.location.href`](https://github.com/appwrite/sdk-for-web/blob/ca4ef6dd0f8d7110db57f8b3b295ce62e629eec5/src/services/account.ts#L729-L733) to redirect the user to the OAuth2 provider to authenticate, but I don't think [React Native supports](https://github.com/appwrite/sdk-for-react-native/issues/10) that. So, as a workaround, you can manually build the URL yourself just like the SDK does and then send the user to that URL with whatever way React Native supports. Just make sure to set a success and failure URL that will redirect the user back into the app.

I am little bit confused also new in react native authentication, If you can provide me some code then it will be very helpful for me. 👍

@SMARTMICROWORLD
Copy link
Author

@SMARTMICROWORLD, thanks for raising this issue! 🙏🏼 Appwrite supports dozens of OAuth2 providers including Google:

image The only problem right now is the [Appwrite web sdk](https://github.com/appwrite/sdk-for-web) uses [`window.location.href`](https://github.com/appwrite/sdk-for-web/blob/ca4ef6dd0f8d7110db57f8b3b295ce62e629eec5/src/services/account.ts#L729-L733) to redirect the user to the OAuth2 provider to authenticate, but I don't think [React Native supports](https://github.com/appwrite/sdk-for-react-native/issues/10) that. So, as a workaround, you can manually build the URL yourself just like the SDK does and then send the user to that URL with whatever way React Native supports. Just make sure to set a success and failure URL that will redirect the user back into the app.

I am getting error:
WhatsApp Image 2023-10-02 at 9 34 26 AM

@SMARTMICROWORLD
Copy link
Author

@SMARTMICROWORLD, thanks for raising this issue! 🙏🏼 Appwrite supports dozens of OAuth2 providers including Google:

image The only problem right now is the [Appwrite web sdk](https://github.com/appwrite/sdk-for-web) uses [`window.location.href`](https://github.com/appwrite/sdk-for-web/blob/ca4ef6dd0f8d7110db57f8b3b295ce62e629eec5/src/services/account.ts#L729-L733) to redirect the user to the OAuth2 provider to authenticate, but I don't think [React Native supports](https://github.com/appwrite/sdk-for-react-native/issues/10) that. So, as a workaround, you can manually build the URL yourself just like the SDK does and then send the user to that URL with whatever way React Native supports. Just make sure to set a success and failure URL that will redirect the user back into the app.

reply me bro plzz

@rayanfer32
Copy link

Is Oauth2 Possible just with REST API's exposed by appwrite ?

@stnguyen90
Copy link
Contributor

I am getting error

@SMARTMICROWORLD, what are you doing that results in that error?

@stnguyen90
Copy link
Contributor

I'm pretty sure native login should work now using custom tokens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product / auth Fixes and upgrades for the Appwrite Auth / Users / Teams services.
Projects
Status: Done
Development

No branches or pull requests

3 participants
0