GitHub Connected App Not Working
Hello,
~ Two weeks ago, I raised a ticket with support (via chat widget) regarding GitHub OAuth and Connected Apps, but I have not received any assistance in resolving the issue.
I have provided a screen recording and step-by-step instructions.
This is my last hope in getting guidance on why we get an "Authentication error" after authenticating a GitHub app.
Here is some context:
We have successfully set-up GitHub OAuth after following the instructions here:
https://kinde.com/docs/authentication-and-access/github/
Next, we followed these instructions to create a connected app:
https://kinde.com/docs/developer-tools/add-connected-apps/
https://kinde.com/docs/developer-tools/github-connected-app/
After clicking on the Connected App URL (Generated via Postman), I am redirected to choose my GitHub account and authorise the app.
The authorisation side of things works because I can see the app has been installed, and I get an email from GitHub.
The problem is I don't get redirected back to my app; I get redirected to:
https://<project>.eu.kinde.com/auth/cx/_:nav&m:auth_error
This redirect is coming from a 302 redirect from this request.
https://<project>.eu.kinde.com/connected_apps/callback?code=<code>&state=<state>
This is the last thing I must solve before proceeding with Kinde as our Auth provider.
Kind regards,
Joel
Kinde Docs
GitHub social sign in - Authentication and access - Help center
Our developer tools provide everything you need to get started with Kinde.
Kinde Docs
Add connected apps - Developer tools - Help center
Our developer tools provide everything you need to get started with Kinde.
Kinde Docs
GitHub connected app - Developer tools - Help center
Our developer tools provide everything you need to get started with Kinde.
25 Replies
Really sorry about missing your other messages. I will get a team member to jump on this for you and get you unblocked.
A team member is looking into this and is investigating what is happening in the backend that is blocking you.
Thank you Andre π
Update on this? I am facing the exact same issue, but with Patreon as a Connected App
Also having the "Authentication error" randomly π€ Someone started looking at it but then ignored me π
Hey all,
It's a public holiday here in Australia, but we will continue to look into this issue with GitHub connected app tomorrow.
Hey @ooi cat,
Are you able to elaborate on your issue with Patreon connected app?
We could not replicate an issue with Patreon connected app.
Hey. Unfortunately I cannot now, but can try it again and see if the error occurs.
I think my "kinde to application" url might have been faulty or something.
The client vars seemed to work since I could accept the oauth window and it would redirect me to kinde
My team are looking into this issue and updating the docs to make it clearer.
We will let you know when these updates have been made.
Just to be clear, my team are looking into the issue with Patreon and GitHub connected apps.
It probably works. It's just me... π
thanks guys
Hi @Oli - Kinde, is there any update on this ticket?
Hi @0xJJW,
Still looking into the issue.
Apologies for the inconvenience.
Sorry for the delay team, we did some digging and come up with more detailed instructions that should get you unblocked.
You might want to double check what is in your callback as the team was able to replicate the auth error by having the
For testing purposes on Postman, you can try http://localhost:3000/ when it sends the first request to
/connected_apps/callback
url in there. You'd want this to be where you're handling the callback from Kinde to your application.For testing purposes on Postman, you can try http://localhost:3000/ when it sends the first request to
{{domain}}/api/v1/connected_apps/auth_url?key_code_ref=<github-ref>&user_id=<user_id>
, it should redirect you to http://localhost:3000?session_id=<session_id>
rather than an auth error which you can then use with this endpoint {{domain}}/api/v1/connected_apps/token?session_id=<session_id>
Let us know how you go with this.Hi @Andre @ Kinde
Thank you for your response. However, the information provided does not seem to address the issue, which I believe is on your server, as I mentioned earlier.
In your response, you mentioned the following:
"You might want to double check what is in your callback as the team was able to replicate the auth error by having the /connected_apps/callback url in there. You'd want this to be where you're handling the callback from Kinde to your application."
I assume you are referring to the "Kinde to application" callback here? If so, then yes, of course, this should NOT reference "/connected_apps/callback" as this is the callback for GitHub. In the video I recorded, I showed my "Kinde to application" callback URL, which did not reference the GitHub callback. I have tried using a Toddle and a Webflow domain (https://example.toddle.dev, https://example.webflow.io). Ofc I used real domains, not example ones. I also tried using a localhost proxy.
While I appreciate the investigation, it appears the issue mentioned was fabricated and unrelated to my initial post, support chat, or video.
I believe the issue lies in the /connected_apps/callback logic, which accepts the code and state parameters. Something could be wrong with my GitHub configuration, but unfortunately, I have not been able to identify the cause after running through the docs multiple times.
As I am not the only one facing the issue, I am happy to provide any access you need to identify the root cause. My Kind account only has a dev environment set up, and the GitHub account used for this integration is brand new with no repositories, so I am more than happy to send you an invitation.
Even if your team could share the error causing the 302, I will happily investigate the issue myself. I am very impressed with Kind as a product and hoped to advocate for it in the Lowcode community, but unfortunately, time is running out for us, and I might be forced to use an alternative solution.
![No description](https://cdn.answeroverflow.com/1225777886028501092/Screenshot_2024-04-05_at_12.47.22.png)
![No description](https://cdn.answeroverflow.com/1225777886540075008/Screenshot_2024-04-05_at_12.32.05.png)
@ooi cat Did you have any luck with your connected app integration?
@0xJJW nope. I am now working with two branches: nextAuth and Kinde
Got closer to solution with just basic JWT token sessions with nextauth
but I might get out of nextauth and implement JWT myself for njs14 approuter
there is no refresh token example in auth.js docs for nextjs app router
apparently it used to be easier to do back in the nextjs pages router era