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

Generate URL safe tokens from Phoenix.Token #1257

Closed
chrismccord opened this issue Oct 7, 2015 · 9 comments
Closed

Generate URL safe tokens from Phoenix.Token #1257

chrismccord opened this issue Oct 7, 2015 · 9 comments
Assignees

Comments

@chrismccord
Copy link
Member

No description provided.

@josevalim
Copy link
Member

We should fix this in Plug. :)

@jeregrine
Copy link
Member

And or maybe add a new fn to URI   


Sent from Mailbox

On Wed, Oct 7, 2015 at 6:22 PM, José Valim notifications@github.com
wrote:

We should fix this in Plug. :)

Reply to this email directly or view it on GitHub:
#1257 (comment)

@josevalim
Copy link
Member

Elixir is fine, it has everything we need. We just need to use url_encode64/url_decode64 in Plug.

@scrogson
Copy link
Contributor

scrogson commented Oct 8, 2015

Handling this in Plug will break backwards compatibility. I know there are a few people using Plug's crypto stuff to be able to share cookies with Rails apps.

Since the tokens generated from Plug are generally used in cookies, it feels slightly out of place for Plug, IMHO.

@josevalim
Copy link
Member

We can easily maintain compatibility with Plug by using Base.url_decode64 and falling back to Base.decode64. Any reason why this wouldn't work?

@scrogson
Copy link
Contributor

scrogson commented Oct 8, 2015

@josevalim ok, that sounds good. 👍

@scrogson scrogson self-assigned this Oct 10, 2015
@scrogson
Copy link
Contributor

I'll take care of this in Plug.

@chrismccord
Copy link
Member Author

ping @scrogson . how are we coming on this one?

@scrogson
Copy link
Contributor

PR posted here: elixir-plug/plug#309

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

4 participants