Verify_session doesn’t work with jwts. It’s meant only for session management verification from the frontend
rp_st
10/16/2022, 2:48 PM
For JWT Verifciation, use any standard JWT verification lib
b
bert2002
10/16/2022, 2:49 PM
Does that mean I can not make one endpoint available for both authentication methods? (either one?)
r
rp_st
10/16/2022, 2:50 PM
You can. You make make your own middleware which tries both the verification methods
rp_st
10/16/2022, 2:51 PM
verify_session takes a config which allows it to return none in case a sesion doesn’t exist. So if it returns none, try for normal JWT auth. And if that fails too, reject the request
b
bert2002
10/16/2022, 2:55 PM
ohhh okay thanks @rp_st sounds like a nice feature 😄
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).