K
Kindeβ€’8mo ago
0xJJW

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
onderay
onderayβ€’8mo ago
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.
0xJJW
0xJJWOPβ€’8mo ago
Thank you Andre πŸ™
ooi cat
ooi catβ€’8mo ago
Update on this? I am facing the exact same issue, but with Patreon as a Connected App
frankiigb
frankiigbβ€’8mo ago
Also having the "Authentication error" randomly πŸ€” Someone started looking at it but then ignored me πŸ˜“
Oli - Kinde
Oli - Kindeβ€’8mo ago
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.
ooi cat
ooi catβ€’8mo ago
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
Oli - Kinde
Oli - Kindeβ€’8mo ago
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.
ooi cat
ooi catβ€’8mo ago
It probably works. It's just me... πŸ˜„ thanks guys
0xJJW
0xJJWOPβ€’8mo ago
Hi @Oli - Kinde, is there any update on this ticket?
Oli - Kinde
Oli - Kindeβ€’8mo ago
Hi @0xJJW, Still looking into the issue. Apologies for the inconvenience.
onderay
onderayβ€’8mo ago
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 /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.
0xJJW
0xJJWOPβ€’8mo ago
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
No description
0xJJW
0xJJWOPβ€’8mo ago
@ooi cat Did you have any luck with your connected app integration?
ooi cat
ooi catβ€’8mo ago
@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
viv (kinde)
viv (kinde)β€’8mo ago
Hey @0xJJW - sorry to hear you're having trouble with the connected apps feature - I've looked through the video & couldn't see anything that jumped out at me, but was also unable to replicate the issue. Would you mind adding me in as a team member ([email protected]) in Kinde so I can troubleshoot a little further? https://kinde.com/docs/your-kinde-account/add-team-members/#add-a-new-team-member. Thanks so much & sorry again for the trouble.
Kinde Docs
Add team members - Your Kinde account - Help center
Our developer tools provide everything you need to get started with Kinde.
0xJJW
0xJJWOPβ€’8mo ago
Thank you @viv (kinde) , I have sent the invitation. πŸ™‚
viv (kinde)
viv (kinde)β€’8mo ago
Cheers! I'll take a look into it and keep you updated ☺️ Hi @0xJJW - we've found the issue & resolved it - I gave it a test on your app and it's now going thru successfully for me - would you be able to give it another go and see if it's working for you now also? Thanks so much for your patience πŸ™
ooi cat
ooi catβ€’8mo ago
goat
0xJJW
0xJJWOPβ€’8mo ago
Thank you, Viv πŸ™Œ Now it's working I have a follow-up question. Rather than having a GitHub App for OAuth and a Connected App can I just merge the two? I'm asking because the docs mention creating an app for each.
viv (kinde)
viv (kinde)β€’8mo ago
Hi @0xJJW - no problem! On the GitHub side, you should be able to use the same app as long as you've got the correct settings ie scopes / redirect url etc. enabled. On Kinde's side, you'd need to create a seperate app for signing in/up in the SSO auth section & another in the connected apps page
0xJJW
0xJJWOPβ€’8mo ago
Awesome πŸ‘ Btw what was the root cause of the issue I was having? Was it a bug or was it a user error? If it was user error could you let me know what I did so I don't repeat it. πŸ˜…
viv (kinde)
viv (kinde)β€’8mo ago
Ahh no, it was a server err on our side - it was just a bit difficult to track down as we weren't able to replicate it, but being able to see the logs & reproducing on your app helped a lot so thanks a bunch for that!
0xJJW
0xJJWOPβ€’8mo ago
Ok πŸ‘Œ, I am glad I could be of some assistance. Now we can go full steam ahead with Kinde πŸš€ Thanks again for your help, Viv. Without you picking this up, we would have likely moved on.
viv (kinde)
viv (kinde)β€’8mo ago
No worries at all, happy to help! Please feel free to reach out if you have any more q's!
Want results from more Discord servers?
Add your server