Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: callback route fails when state is "null" #24

Merged
merged 2 commits into from
Oct 21, 2024

Conversation

ryanvanoss
Copy link
Contributor

A default WorkOS setup will set the state query param to null, resulting in an exception in the callback.

JSON.parse(atob("null")) throws

VM335:1 Uncaught SyntaxError: Unexpected token '�', "�ée" is not valid JSON
    at JSON.parse (<anonymous>)
    at <anonymous>:1:6

JSON.parse(atob("null")) throws

```
VM335:1 Uncaught SyntaxError: Unexpected token '�', "�ée" is not valid JSON
    at JSON.parse (<anonymous>)
    at <anonymous>:1:6
```
Copy link
Collaborator

@PaulAsjes PaulAsjes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@PaulAsjes PaulAsjes merged commit 1301028 into workos:main Oct 21, 2024
ryanvanoss added a commit to ryanvanoss/authkit-remix that referenced this pull request Oct 22, 2024
@ryanvanoss
Copy link
Contributor Author

@PaulAsjes don't thank me too soon, apparently I can't spell...

#25 fixes the typo that this introduced.

@ryanvanoss ryanvanoss deleted the patch-1 branch October 22, 2024 00:15
PaulAsjes pushed a commit that referenced this pull request Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants