Skip to content

Error 400, Bad Request when using authClient.requestAccessToken #15

@LightYagami200

Description

@LightYagami200

I'm getting Error 400, Bad Request when trying to use authClient.requestAccessToken(code)

Expected behavior

I should get the token and be able to make requests on behalf of logged in user.

Actual behavior

I get this error message

image

Steps to reproduce the behavior

Generate auth url with this code:

const authUrl = authClient.generateAuthURL({
  code_challenge_method: 's256',
  state: 'STATE',
});

Visit that url - authenticate with twitter and use the code to get access token:

await twitterAuthClient.requestAccessToken(code as string);

Now it throws that error

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