Skip to content

context/AuthContext.tsx #8

@jasonsprouse

Description

@jasonsprouse

Stych isn't implemented yet.

The authenticateWithStytch function signature expects (accessToken: string, userId?: string, method?: string) but is being called with just (method). This will cause a type mismatch and runtime error.

TODO: Replace the following with actual logic to obtain the accessToken and userId
For example, you might prompt the user for their OTP and use Stytch's SDK to verify and get the accessToken
const accessToken = await getStytchAccessToken(method);
You need to implement getStytchAccessToken
If you have a userId, obtain it here. Otherwise, you can omit it.
const userId = ...;
const result = await authenticateWithStytch(accessToken, undefined, method);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions