getting Error 400 Missing ID from OAuth2 provider (https://github.com/appwrite/appwrite/blob/0.7.x/app/controllers/api/account.php#L475) and after I refresh the page error changes to Error 500 Failed to obtain access token (https://github.com/appwrite/appwrite/blob/0.7.x/app/controllers/api/account.php#L465)
tried temp token, access token, and API endpoint individually using postman and it works (gives required JSON data back)
appwrite logs have the following error:
[Error] Method: GET
[Error] URL: /v1/account/sessions/oauth2/:provider/redirect
[Error] Type: Utopia\Exception
[Error] Message: Missing ID from OAuth2 provider
[Error] File: /usr/src/code/app/controllers/api/account.php
[Error] Line: 475
(after browser refresh)
[Error] Method: GET
[Error] URL: /v1/account/sessions/oauth2/:provider/redirect
[Error] Type: Utopia\Exception
[Error] Message: Failed to obtain access token
[Error] File: /usr/src/code/app/controllers/api/account.php
[Error] Line: 465
request chain & code: https://del.dog/zoho-oauth.txt (Zoho.php placed in this directory : https://github.com/appwrite/appwrite/tree/0.7.x/src/Appwrite/Auth/OAuth2)
redirect URI is added in the Zoho API console. I tried several things (modifying headers, params, etc.) but none worked.
One more thing I noticed is from temp_token(or 'code') which I get from Zoho to appwrite callback after getLoginUrl(), when I use that token from the postman to get access token I get error "invalid_token" with 200 OK while I get access_token refresh_token when I use 'code' obtained directly making the request to Zoho endpoint.
please can anyone help me debug this?
any hints on how to debug?
Обсуждают сегодня