#Logging in and setting JWT or cookies with custom auth (Google OAuth)

1 messages · Page 1 of 1 (latest)

vale dirge
#

I'm currently setting up Google OAuth, I've gotten all the endpoints set up (including getting the access_token. But now I'm just wondering how can I actually let Payload know that the user is signed in?

vale dirge
#

It's kind of more, where do I store the jwt token when I generate this, or if I store this cookie, how do I link these forms of auth to Payload, i.e. how would payload know I'm logged in with these auth strategies?

brisk flare
vale dirge
#

I've tried looking into that although it seems to produce all sorts of errors such as 400 when I request POST /payload/api/user/login or 403 whenever I try to signin with a different auth strategy, i.e. sending a google auth token (it expects a password when this is a different auth strategy)

plain void
vale dirge
#

Haha I thought of implementing auth without payload anymore as the custom auth strategies seemed quite finicky

#

I ended up using bcrypt and JWT

#

I wanted both standard auth and google oauth so used JWT to encrypt the both of them

feral kernel
#

Hello @vale dirge how did you manage completing your requirement?

vale dirge
feral kernel
#

Thank you for the speedy reply.
Did you also make any modifications on the AUTH operations?

vale dirge
#

We completely no longer use payload auth anymore for our custom apis

feral kernel