when using createEmailPasswordSession
const session = await account.createEmailPasswordSession(email, password)
i am able to get the session
but when using
const session = await account.createOAuth2Session(
OAuthProvider.Google,
'http://localhost:3000/',
'http://localhost:3000/logiin/',
)
not getting any session
Summary
Developers are having trouble extracting information from the createOAuth2Session zustand store. The method does not return session information; instead, it redirects to a success/failure URL. To display user information like avatar and username, use account.getSession('current'). When using createOAuth2Session with Google, the developers are not receiving any session information.
I don't believe the oauth method returns any session informaiton, it redirects you to your success/failure url. If you want to check session you can do account.getSession('current');
Kenny
Jan 11, 2025, 20:46
If you look in the docs for this method, it tells you the response.