Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use access token for API Gateway Authentication #1779

Open
Mominadar opened this issue Dec 12, 2024 · 1 comment
Open

Use access token for API Gateway Authentication #1779

Mominadar opened this issue Dec 12, 2024 · 1 comment

Comments

@Mominadar
Copy link

Hi,

I am trying to OAuth as a custom authorizer for my AWS API Gateway APIs. The issue I am facing is that the access token I get is not a valid JWT token and so when I sent if over to API Gateway it cannot parse it to validate it. I am following the instructions here : https://auth0.com/docs/customize/integrations/aws/aws-api-gateway-custom-authorizers

I can get the access token by sending a request to token endpoint but that does not work on the browser. I need to be able to get it directly on browser so I can send requests from there since there is no backend for my application. Please help.

Note: user is successfully logged in and I get the id token and access token. The only issue is that the access token is not JWT and cannot be parsed for custom authorization.

@Badisi
Copy link
Contributor

Badisi commented Dec 12, 2024

I don't quite remember what was exactly needed for that.
But I do remember having to set the audience in case of Auth0 so that the access_token became a JWT.

{
    scope: 'openid profile email phone offline_access read:current_user',
    extraQueryParams: {
        audience: 'https://dev-fijd1e9x.us.auth0.com/api/v2/'
    }
}               

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants