functions-samples icon indicating copy to clipboard operation
functions-samples copied to clipboard

[BUG] in sample:

Open emarin opened this issue 1 year ago • 0 comments

Which sample has a bug?

Node-1st-gen/spotify-auth

How to reproduce the issue

follow the readme.

Upon trying to login, the "token" function fails with "Error in the token Function: Error: State cookie not set or expired. Maybe you took too long to authorize. Please try again.". Location of error in code is https://github.com/firebase/functions-samples/blob/main/Node-1st-gen/spotify-auth/functions/index.js#L69

This is because the state cookie is not present in the request, hence the cookie verification fails I have tried on Chrome and Safari

Debug output

Login popup shows error message : Error in the token Function: Error: State cookie not set or expired. Maybe you took too long to authorize. Please try again.

Expected behavior

Successful login

Actual behavior

Login failure

emarin avatar Oct 06 '24 16:10 emarin