-
Notifications
You must be signed in to change notification settings - Fork 43
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
Does this work with barebones Elixir / no Phoenix? #123
Comments
Great question. ❓ ❤️ |
Yes, it does. The request is done successfully and I've compared the payload and it seems to be the same in both the phoenix and the bare elixir, but the phoenix one does return the proper profile data while the elixir can't exchange the user code for the token. Could it be the JSON parsing somehow being different? I'm also using HTTPoison. Btw, if it's any helpful, I was testing yesterday and even though the variables were being added as I could see in the request, I modified the module code to have the client id and secret be static and that instead throws a redirect_uri_mismatch even though the redirect uri is added to the GC project. I also wrote a different function with the same structure as the module and this one does throw the redirect_uri_mismatch as well. Here's the code:
Here are the response's request objects in both projects, copy pasted straight from the raw response (I'm pretty sure they are the same): Bare elixir:
Phoenix
I can also provide how I'm treating the code in the Next.js frontend (I'm using a popup instead of a redirect):
|
I'm trying to use this in a project without Phoenix and, with the same exact credentials, it will work on the Phoenix project but not on the Elixir one. It keeps throwing the "invalid_client" and "The OAuth client was not found." error after I request the token. I am running the server and client separately.
Here's the code:
Am I doing something wrong? This is the only relevant code to the project, and it is throwing after ElixirAuthGoogle.get_token/2
The text was updated successfully, but these errors were encountered: