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

Read the cookie from a browser? #12

Closed
samalba opened this issue Dec 15, 2014 · 2 comments
Closed

Read the cookie from a browser? #12

samalba opened this issue Dec 15, 2014 · 2 comments

Comments

@samalba
Copy link

samalba commented Dec 15, 2014

I'm trying to read a secure cookie from the browser (just signed, not encrypted). The Base64 algorithm looks different from the native atob function...

Anyone tried this before?

@dchest
Copy link
Contributor

dchest commented Mar 27, 2015

@samalba securecookie uses URL-safe base64 encoding. To turn it into the normal encoding, which you can decode with atob, do this:

var output = cookie.replace("-", "+").replace("_", "/");

@elithrar
Copy link
Contributor

elithrar commented Aug 6, 2015

@samalba I'm going to close this one out as Dmitry answered it.

@elithrar elithrar closed this as completed Aug 6, 2015
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

No branches or pull requests

3 participants