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

Support direct requests from the browser #3

Open
oliverbarnes opened this issue Apr 30, 2020 · 1 comment
Open

Support direct requests from the browser #3

oliverbarnes opened this issue Apr 30, 2020 · 1 comment

Comments

@oliverbarnes
Copy link
Member

In requests straight from javascript in the frontend, the consumer app server would be bypassed. In this case the key will be visible in the javascript source.

So supporting direct javascript requests will be more involved. One reference implementation is Stripe publishable keys

Originally posted in #2 (comment)

@oliverbarnes
Copy link
Member Author

Phoenix has built-in token generation: https://hexdocs.pm/phoenix/Phoenix.Token.html

Thread on token auth with elixir: https://elixirforum.com/t/is-there-any-recommended-way-of-doing-api-authentication/5954/5

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

1 participant