firebase/functions-samples

[BUG] in sample:

Closed this issue · 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