Welcome to the Kinde community.

A
A
A
M
T

Github connected apps

Hi, I've been struggling to set up a Github login via Connected apps. I'll try to explain it briefly. I'm a newbie so excuse me if anything I'm missing is an easy one.

I'm trying to authorize my Github app when logging in however, if I switch off the Github social sign-in on the Kinde dashboard, the default Kinde login button component redirects to a page where there is no "Login with Github" button. I assume in this case if I use Connected apps I should handle this transition page myself. But then am I gonna be able to receive the logged-in user's data within my app via getKindeServerSession() ?

I've been searching through the docs and I'm quite confused with the settings of the login options.

It's mentioned that the callback URL that I should set in the settings of my GitHub app(provided by Kinde) is for redirecting the user back to my app, however, then I'm not able to intercept this process to get the code param and exchange it with an access token for Github API access. Extra callback URLs I set does not even get triggered.

So my questions are as follows:
  • What should be the callback URLs in my GitHub App settings and in my Kinde Connected App settings?
  • At which point I should intercept this process to get the code param so that I can continue with my authorization process?
  • In that case, should I keep the "Allowed callback URLs" section on my backend-web app empty?
My main purpose is to be able to get the code param after redirecting from the authorization process but the callback URL that Kinde provides does not allow me to get it and if I don't use Kinde's URL, I'm not able to use getKindeServerSession()
What am I missing?

I found it quite confusing and my personal opinion is that the docs should have a clearer explanation of differentiating between Social sign-in and Connected apps. Thank you in advance and I hope it's clear.

  • Next.js app router.
O
`
5 comments
Hi @ish, Thanks for reaching out and explaning in detail all your issues. Also thanks for including feedback on our docs on social sign in and connected apps. In order to help you out I need to understand what you are trying to achieve? Do you want a login with github` option on your login screen?
If yes, then head to GitHub social sign in.

Or do you want your users to be able to connect their GitHub profile with your application so you can pull or push information between your application and their GitHub account? If yes, then head to GitHub connected app

Once I know what you are trying to achieve, I can help you further.
Hi Oli, thank you for the answer.

That's right, I am trying to achieve a connection between my app and the user with authorization so that I can take action on behalf of the users. However, to be able to achieve that, I need to store the code parameter Github provides after a successful authorization.

I've tried both social sign in and connected apps but having authorization error from Kinde once the redirect to my happens.
I'm also not able to intercept the login process since Kinde callbacks are handling it and redirects are happening without the code parameter.
There is an existing issue that I face too, I thought maybe it might be relevant: https://discord.com/channels/1070212618549219328/1222593279389077604/1222593279389077604
Is there any update on this?
Hi @ish, Sorry that you are experiencing issues with the github` connected app.
It's a public holiday here in Australia today and on Monday. My expert connected apps teammate will be online on Tuesday.
I will make sure they look into this issue then.

Apologies for the inconvienience.
No worries, thank you for taking the time to answer. You guys have a great holiday.
I'd be glad if this ticket stays open and any update is posted.
Cheers!
Yep I will update here and in https://discord.com/channels/1070212618549219328/1222593279389077604/1222593279389077604 once this issue is resolved.
Apologies again for the inconvience.
Add a reply
Sign up and join the conversation on Discord
Join