Comments (12)
In general,
/auth/:strategy_name
initialize the workflow based on the strategy name.
/auth/:strategy_name/callback
received the information from the workflow.
I am not sure if these questions are answered on Ueberauth already @ueberauth/core ?! I am sure that this is documented.
from ueberauth_identity.
The docs are wrong are they not? There is no /auth/identity in the 'workflow'.
from ueberauth_identity.
identity
comes from the name of the strategy so by you injecting the ueberauth_identity
strategy you will have identity
available.
Sorry if I am misunderstanding something.
from ueberauth_identity.
Sorry if I am misunderstanding something.
You are, but its no big deal, its just a doc thing.
In ueberauth the user clicks
GET /auth/:strategy_name
And that starts the flow, I think we agree with that.
However, in ueberauth_identity
GET /auth/:strategy_name
Doesn't seem to exist, there is no route for it, if you go to
GET /auth/identity
I only get an error, something about request/2 not there
Which makes sense, because
/auth/:strategy_name
Is a GET route, and when you submit a login form for ueberauth_identity, you would not be making a GET request.
I'm just pointing out in the docs, references to
/auth/identity
are not correct.
from ueberauth_identity.
From the README
-
Create the request and callback routes if you haven't already:
scope "/auth", MyApp do pipe_through :browser get "/:provider", AuthController, :request get "/:provider/callback", AuthController, :callback post "/identity/callback", AuthController, :identity_callback end
Did you add the proper routing on your app?!
from ueberauth_identity.
Where is the
POST /auth/identity
In those routes?
As in the example
https://github.com/ueberauth/ueberauth_example/blob/master/lib/ueberauth_example_web/templates/auth/request.html.eex
<%= form_tag @callback_url, method: "post" do %>
from ueberauth_identity.
@kswope there is not POST /auth/identity
but POST /auth/identity/callback
The POST
to the callback is done by the OAuth2 workflow, no by you. You just initialize the workflow by doing GET /auth/:provider_name
from ueberauth_identity.
The POST to the callback is done by the OAuth2 workflow, no by you. You just initialize the workflow by doing GET /auth/:provider_name
There is no way that is correct. You are saying to start the ueberauth_identity workflow you have to submit a form (with a password) to a GET??? You never submit a form using a GET, its a violation of REST principles and will get you in big trouble, and you also cannot guard against CSRF attacks.
There is further evidence you are wrong, in the ueberauth_identity example, the form, as I pointed out, is a POST
<%= form_tag @callback_url, method: "post" do %>
ueberauth_identity seems to have a 1 stage workflow, unlike ueberauth itself, which is a two stage workflow.
from ueberauth_identity.
@kswope you are right, I forgot the context of talking about identity
provider.
from ueberauth_identity.
Ok, so back to the original post, I'm correct, right? Doc error? I'm passionate about this because I lost a couple hours trying to figure it all out, not including this thread :)
from ueberauth_identity.
@kswope a PR clearing up the documentation is always welcomed! 😁
from ueberauth_identity.
this was closed with #25
thanks @kswope
from ueberauth_identity.
Related Issues (16)
- Add identity management capabilities HOT 4
- Question: Persist in User table or Oauth authorization table? HOT 1
- Can you customize credentials field? HOT 2
- Jsonapi & nested attributes HOT 3
- Issues with current elixir HOT 3
- undefined function validate_password/1 HOT 3
- How do you clear the password from the assigns? HOT 1
- Can we have a new release on hex? HOT 2
- Compile warning on 0.2.3 on Elixir 1.8.0-otp-21.2.2 HOT 2
- Hexdocs link is broken HOT 1
- Not compatible with ueberauth 0.7.0
- Using Strategy.Identity: AuthView.render/2 is undefined (module MyApp.AuthView is not available)
- Strategy.Identity: undefined function "validate_password" in "identity_callback" HOT 1
- Support for form_for field in config.exs HOT 2
- Scrub empty string to nil
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ueberauth_identity.