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

Added state and nonce cookies for token validation #51

Merged
merged 1 commit into from
Oct 24, 2016

Conversation

lboyette-okta
Copy link
Contributor

Resolves: OKTA-104490

In order to validate id_tokens sent to the server via query responses, we need to pass cookies with the state and nonce. We store stringified JSON in okta-oauth-redirect-params, but this is non-trivial to parse on the server, so I've added okta-oauth-state and okta-oauth-nonce to make this easier.

I also changed the path of the cookies to match root. Without the root path, the cookies aren't parseable from different url paths.

@rchild-okta @magizh-okta

@rchild-okta
Copy link
Contributor

rchild-okta commented Oct 21, 2016

nit: Add emoji to the commit message 🌱

Copy link
Contributor

@rchild-okta rchild-okta left a comment

Choose a reason for hiding this comment

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

lgtm 🚀

One other nit: Might be good to add a comment to the previous cookie saying that we're going to deprecate keeping the state and none in there (if that's what we're planning on doing).

@lboyette-okta
Copy link
Contributor Author

@rchild-okta I don't plan on removing the state and nonce yet. I may, however, move the entire thing out of cookies and store it in localStorage instead.

@lboyette-okta lboyette-okta merged commit 82e5a1d into master Oct 24, 2016
@raphaellondner-okta
Copy link

raphaellondner-okta commented Oct 26, 2016

@lboyette-okta do you mean to say that you plan to keep those values available both in those 2 new cookies as well as in localStorage?

@lboyette-okta
Copy link
Contributor Author

@raphaellondner-okta I do

@jmelberg-okta jmelberg-okta deleted the lb-104490-easier-cookies branch April 23, 2018 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants