Skip to content
This repository was archived by the owner on Feb 21, 2020. It is now read-only.
This repository was archived by the owner on Feb 21, 2020. It is now read-only.

Response doesn't seem correct for the example #15

@trepidity

Description

@trepidity

If I use just the example, straight from a clone, it fails. At least when I tried with Google and Facebook. From what I could tell, the response wasn't encoded, but just a JWT.

To get the example to work, I had to add/change response_type, scope, nonce, audience to the startAsync call.
Can someone confirm this or why and if so I will submit a PR.

My modified piece

  _loginWithAuth0 = async () => {
    const redirectUrl = AuthSession.getRedirectUrl();
    console.log(`Redirect URL (add this to Auth0): ${redirectUrl}`);
    const result = await AuthSession.startAsync({
      authUrl: `${auth0Domain}/authorize` + toQueryString({
        client_id: auth0ClientId,
        response_type: 'id_token',
        scope: 'openid email profile',
        audience: 'https://example.auth0.com/userinfo',
        nonce: await this.getNonce(),
        redirect_uri: redirectUrl,
      }),
    });

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