What is the "token" returned by auth.api.signinEmail?

Hello,

I use a custom endpoint for sign-in/email.

The return of auth.api.signinEmail() is:

const result: {
    redirect: boolean;
    token: string;
    url: string | undefined;
    user: {
        id: string;
        email: string;
        name: string;
        image: string | null | undefined;
        emailVerified: boolean;
        createdAt: Date;
        updatedAt: Date;
    };
}


Do I have to return all to the front end for authClient, or is some data not intended for the front end?
In particular, what is the token used for?

Thank you
Solution
you most likely don't need to return it but it's safe to return
Was this page helpful?