Back

[SOLVED] Error: "Failed to obtain access token" when authorizing github

  • 0
  • General
Phoinex
19 Sep, 2023, 18:39

After authorizing github it successfully redirects me back to the appwrite console but I receive the below error and nothing happens in the console.

TypeScript
appwrite  | [Error] URL: /v1/account/sessions/oauth2/:provider/redirect
appwrite  | [Error] Type: Appwrite\Extend\Exception
appwrite  | [Error] Message: Failed to obtain access token. The GitHub OAuth2 provider returned an error: Not Found
appwrite  | [Error] File: /usr/src/code/app/controllers/api/account.php
appwrite  | [Error] Line: 487

Version 1.4.3

TL;DR
User experienced an error "Failed to obtain access token" when authorizing GitHub on appwrite. User resolved the issue by flipping the callbacks in the correct order. It is suggested to check if the callbacks were set up in the same order as mentioned in the documentation.
Drake
19 Sep, 2023, 20:01

Something may be misconfigured....did you set up the callbacks in the same order as mentioned in the docs?

https://appwrite.io/docs/configuration#git

Phoinex
19 Sep, 2023, 21:22

The callbacks were in reverse order, I flipped them and now it's working. Thank you for help 🙂

Drake
19 Sep, 2023, 21:38

[SOLVED] Error: "Failed to obtain access token" when authorizing github

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more