Why is accessToken defined as string | null in LogInResult? What has to happen for the accessToken to have the value null?

I am using the expo-google-app-auth package.
But I don’t understand why LoginResult is defined like this:

export declare type LogInResult = {
    type: 'cancel';
} | {
    type: 'success';
    accessToken: string | null;
    idToken: string | null;
    refreshToken: string | null;
    user: GoogleUser;

What has to happen that accessToken is null after calling Google.logInAsync? Why is accessToken not simply defined as string, but as string | null?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.