Back

Login with OAuth Questions

  • 0
  • Accounts
  • Web
Zeke(Jafesu)
29 Jul, 2023, 03:21

Hey, got 2 questions regarging Signin with OAuth

  1. I know it returns a Session object, is there a way to have it reauth or convert to an account object so that account.get works?
  2. When redirecting to my OAuth success page, i have it calling account.getSession('current') and I am getting appwriteException: User (role: guests) missing scope (account) Not sure what I am doing wrong
TL;DR
The user is having two questions about Signin with OAuth: 1. They want to know if there is a way to reauth or convert the returned Session object to an account object so that account.get works. 2. When redirecting to their OAuth success page and calling account.getSession('current'), they are getting an error saying "User (role: guests) missing scope (account)" and are unsure what they are doing wrong.
Drake
29 Jul, 2023, 03:45

You might be facing a problem with 3rd party cookies. Either allow them in your browser settings or have your Appwrite endpoint be a sub domain of your app.

Zeke(Jafesu)
29 Jul, 2023, 19:07

It's currently redirecting to localhost for dev purposes, will it not work with localhost?

Drake
29 Jul, 2023, 19:38

You will still need to do what I recommended. For the domain approach, you can modify your hosts file.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more