Skip to content
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

feat: Add native sign in for Kakao with OIDC #25981

Closed
wants to merge 0 commits into from

Conversation

nectarine
Copy link

@nectarine nectarine commented May 10, 2024

I have read the CONTRIBUTING.md file.

YES

What kind of change does this PR introduce?

feature, docs update

What is the current behavior?

https://github.com/orgs/supabase/discussions/23368
Kakao provides two different keys which are REST API key, and Native app key.
Supabase accept only one key(currently REST API key), so it should accept both keys to provide seamless sign in process in native apps.

What is the new behavior?

스크린샷 2024-05-10 오후 2 37 33

A local dev studio doesn't show me a Provider section in Authentication > Configuration, but I added a new field for the Native app key, similar to Authorized Client IDs of Google

Also, I add the docs with native app sign in with trying my best to preserve original author's tone.

Additional context

supabase.auth also must be fixed to accept this new value EXTERNAL_KAKAO_NATIVE_APP_KEY.
(https://github.com/supabase/auth/blob/ed2b4907244281e4c54aaef74b1f4c8a8e3d97c9/internal/api/token_oidc.go#L77)
I'll make a new PR in that repository after this PR is accepted.

@nectarine nectarine requested a review from a team as a code owner May 10, 2024 05:42
Copy link

vercel bot commented May 10, 2024

@nectarine is attempting to deploy a commit to the Supabase Team on Vercel.

A member of the Team first needs to authorize it.

@saltcod saltcod requested a review from hf August 8, 2024 16:29
@kangmingtay
Copy link
Member

hi @nectarine, thanks for contributing! can you please link the relevant docs from kakao that explains the differences between the "REST API Key" and "Native App Key"?

I'll make a new PR in that repository after this PR is accepted.

Unfortunately, that isn't possible because adding a new field to support "Native App Key" without first making changes on the backend will cause alot of confusion for our users.

supabase.auth also must be fixed to accept this new value EXTERNAL_KAKAO_NATIVE_APP_KEY

The way this works with Google and Apple is that we accept a comma-separated string of client ids in the EXTERNAL_XXX_CLIENT_ID variable. The first client_id is assumed to be the client id used for Web OAuth and the others are accepted client ids for native / mobile use cases. I don't think we need to create a separate env var to store the EXTERNAL_KAKAO_NATIVE_APP_KEY since we can just reuse EXTERNAL_KAKAO_CLIENT_ID .

@nectarine
Copy link
Author

Absolutely.
https://developers.kakao.com/docs/latest/en/getting-started/app#app-key

Native app key: Used to initialize the Kakao SDK for Android or initialize the Kakao SDK for iOS.

Just like Google, Kakao requires different keys with different platforms.

And of course, yes, it doesn't have to be a special field for Native App Key.
I just tried to reusing patterns in Google and Apple. They both have a single id field and have extra ids field or one more special field(bundle Id) ;)

Modifying EXTERNAL_KAKAO_CLIENT_ID with a comma-separated string form would work.

I'll make a updated commit in a few days.

Copy link

vercel bot commented Aug 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
design-system ⬜️ Ignored (Inspect) Visit Preview Aug 14, 2024 4:20am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants