#google oauth2

17 messages · Page 1 of 1 (latest)

jovial solstice
#

hey folks

I am getting User (role: guests) missing scope (account)"

which seems to be a fairly common issues

  1. I attempt login with google oath, then fails and redirects me back each time
  2. google oath says it can take weeks for my oath scope and app to be approved, could this be it?

Here is my appwrite config, using oath2 with google


console.log(OAuth2Provider)
const url = import.meta.env.VITE_APPWRITE_ENDPOINT;
const project = import.meta.env.VITE_APPWRITE_PROJECT;

const client = new Client();

client
    .setEndpoint(url)
    .setProject(project);

export const account = new Account(client);

account.createOAuth2Session(
    OAuthProvider.Google,
    'https://main--videogame-selector.netlify.app',
    'https://main--videogame-selector.netlify.app/',
    ['https://www.googleapis.com/auth/userinfo.email']
);

am i missing something?

  1. Ive enabled all roles for each collection on my appwrite platform
  2. I created oath2 with google, passed corrrect id and key to google and apprwite
#

google oauth2

mighty light
hardy lance
#

I am currently facing same issue. And it's in prod but it doesn't happen for everyone testing the app, it has only happened for 1 person so far.

When I run the process in my end, it works well but when she does it on her end it doesn't work.

Even signing up with email returns an invalid_parameters error, but it works for other people.

I have tried to replicate it locally or in production but I have not been able to do it.

Told her to check her cookies and site data but nothing has been set so far so it's clean.

mighty light
jovial solstice
mighty light
jovial solstice
#

oh right to run locally

let me try that - but I would change my appwrite endpoint in my .env to run locally, right?

#

So im trying to now fix local and production

  1. local, im not quite sure how to set local endpoint and app url to the same?
  2. I created my domain in the appwrite settings page, but its says verification failed - not sure what to do with that now?

its deployed and hosted with netlfiy

mighty light
jovial solstice
mighty light
jovial solstice
#

ohh ok thank you

So I need to buy a domain in order to use oauth with appwrite?

mighty light
jovial solstice
#

Ohh okok fair enough

Hoping this will fix my issues. will try again tonight - appreicate it