#Google auth not working #2

7 messages · Page 1 of 1 (latest)

plush nymph
#

So yesterday I posted an issue with the Google auth functionality - I followed all the steps in https://medusa-plugins.vercel.app/authentication/google, however when I click on 'Sign in with Google' I'm redirected to my 'successRedirect' (meaning it was successful), but when I click on 'account' again I'm shown the login screen again, basically like the successful login never happened.

now, here's what's weird - in the admin dashboard under 'Customers' I can actually see the details of the newly logged in account. I'm using Medusa version 1.20.0 and the auth plugin is 1.9.1.

here is my
{
resolve: "medusa-plugin-auth",
/** @type {import('medusa-plugin-auth').AuthOptions} */
options: [
{
type: "google",
// strict: "all", // or "none" or "store" or "admin"
strict: "none",
identifier: "google",
clientID: GoogleClientId,
clientSecret: GoogleClientSecret,
admin: {
callbackUrl: https://medudabackend-production.up.railway.app/admin/auth/google/cb,
failureRedirect: ${ADMIN_URL}/login,
// This query param will have priority over this configuration
successRedirect: https://pixelsjourney.com/
},
store: {
callbackUrl: https://medudabackend-production.up.railway.app/store/auth/google/cb,
failureRedirect: http://${STORE_URL}/login,
successRedirect: https://pixelsjourney.com/

    }
  }
]
},

As you guys can see I have my own domains now and all is deployed. the same issue is replicated both in my local env and in prod.

any suggestions?

plush nymph
#

I'll bump this, still no solution :/

glossy mauve
#

I would suggest to first have both frontend and backend under the same main domain

In example api.pixelsjourney.com

plush nymph
#

Do you mind elaborating why this might help?

The default (locally) is different domains, localhost 9000 and 8000.
I'm ruling this out, I've basically tried almost anything, I just want to understand the reason

glossy mauve
#

How is localhost and localhost a different domain

#

Ok then, rule this out.

plush nymph
#

Haha I'm sorry man I meant to say that I'm not ruling this out, my bad! A typo. I'll give it a shot