embedded-app-sdk icon indicating copy to clipboard operation
embedded-app-sdk copied to clipboard

The client throws an error when response_type is token in command AUTHORIZE

Open kuylar opened this issue 1 year ago • 1 comments

First of all, I know that using response_type: token is not meant to be used in Embedded Apps. However, while writing an SDK wrapper for Godot, I decided to try sending it to check if it would work.

The API request succeeded, but I got this error as a response, instead of a normal error message telling me to use response_type: code instead (that's what I expected to get).

{
    "code": 1000,
    "message": "Cannot read properties of undefined (reading 'split')"
}

After checking the API side, I found out that the response was successful, but my theory is that the client splits the response string by ?, expecting the code to be in there, but since the token url data is in the hash instead of in the query, this throws an exception.

Would love to hear more about this. Thanks in advance!

kuylar avatar Mar 20 '24 19:03 kuylar

Great callout. We do not support implicit flows for activities and will update the RPC server to notify users accordingly. I'll leave this issue open for now and hope to close it once a better error is surfaced.

matthova avatar Apr 18 '24 03:04 matthova