Skip to content

useSignIn() with Google OAuth creates account but hook does not work #37

@ctjlewis

Description

@ctjlewis

Bug report

The useSignIn() hook does not work correctly.

Description / Observed Behavior

Try to use the sign-in hook, and successfully log in (the user is created in the Supabase console), but when I'm redirected, the new session is not loaded by the hook, despite that being the core functionality:

const [{ error, fetching, session, user }, signIn] = useSignIn();
console.log({ user, session });
// { user: undefined, session: undefined }

Expected Behavior

After signing in, the hook should return the user and session data.

const [{ error, fetching, session, user }, signIn] = useSignIn();
console.log({ user, session });
// something other than all undefined

Repro Steps / Code Example

Included.

Additional Context

Latest version. Basic sign-in. No idea why this would not work out of the box.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions