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
Add a redirect_uri function so that the redirect_uri is configurable #18
Comments
@aef- PRs are welcome for new functionality 👍 |
I don't know wheter this is related, but I'm also working with a single page application and an elixir API. pry(6)> params
%{"clientId" => "...",
"code" => "4/vLOSfRQi-OK6B...",
"provider" => "google", "redirectUri" => "http://localhost:3333",
"state" => "....."}
pry(7)> fails
%Ueberauth.Failure{errors: [%Ueberauth.Failure.Error{message: nil,
message_key: "redirect_uri_mismatch"}], provider: :google,
strategy: Ueberauth.Strategy.Google} I'm not sure how to continue, I'm pretty sure I've configured well the allowed redirect uris on google console. |
Indeed, made a fork to implement this functionality and that worked for me. config :ueberauth, Ueberauth,
providers: [
google: {Ueberauth.Strategy.Google, [
callback_methods: ["POST"],
callback_path: "/api/auth/google/callback",
callback_url: "http://localhost:3333" # Where my Brunch app is running
]}
] Making a PR ASAP. |
This has been merged into master. I'll release a new version later this evening, ideally with #28 included. |
Hi there! Currently I'm using only the callback functionality of ueberauth (specifically Facebook and Google). My client grabs the access code and then sends it to my API in order to retrieve the token. On dev I'm running my API and client on separate ports, so to support how most ueberauth's implement handle_callback by setting the redirect_uri as so:
opts = [redirect_uri: callback_url(conn)]
, I need a reverse proxy.Adding a a helper function redirect_uri that grabs either the uri from the config or callback_url for oauth implementations to use would be really helpful for scenarios like this.
What do you think?
The text was updated successfully, but these errors were encountered: