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

Consider providing cookie / session based mechanism for API applications #59

Closed
acrolink opened this issue May 20, 2018 · 5 comments
Closed

Comments

@acrolink
Copy link

acrolink commented May 20, 2018

The current behavior of phauxth installer is to provide either:

  1. Session based authentication if the application is HTML based.
  2. Token based authentication if the api switch is used.

It would be nice to have additional switch for the installer to specify a JSON API setup based on session / cookie storage (not tokens) since storing the token inside a session cookie provided best security (compared to storing it for example in local storage by the client side JS application).

You are welcome to join the discussion here:
Sending cookies for stateless SPA authentication using JWT

@vloaix
Copy link

vloaix commented May 21, 2018

It is not a switch for the installer, but this?

Also, I think it has made clear that using JWT for client auth is not a good idea in several elixirforum's discussions.

@riverrun
Copy link
Owner

I'm really busy at the moment, but early June I should be able to address this. Sorry for the delay.

@riverrun
Copy link
Owner

riverrun commented Sep 3, 2018

I can update the Phauxth Authenticate plug to handle tokens that are stored in cookies. Is that what you want?

@acrolink
Copy link
Author

acrolink commented Sep 3, 2018

@riverrun, I think it would be nice to allow storing and reading the tokens from cookies. I have already done that within Guardian and it is working fine.

@riverrun
Copy link
Owner

I have added information about how to customize Authenticate.Token to the documentation for that module, and there is also an example module in the custom_authenticate.exs file (Phauxth.AuthenticateTokenCookie).

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