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

Only the information requested by the scope is not imported. and not response phone_number data #1445

Open
lightofjeju opened this issue Feb 21, 2024 · 9 comments · May be fixed by #1463
Open
Labels
bug Something isn't working

Comments

@lightofjeju
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

Only the information requested by the scope is not imported

  1. Check the personal information items that can be received when logging in on the Kakao developer site.
  2. Try OAuth kakao login
  • await supabase.auth.signInWithOAuth(
    OAuthProvider.kakao,
    scopes: "profile_image,name,gender,birthday,birthyear,phone_number"
    )
  1. It says it's an incorrect request.
  2. I didn't request profile_nickname, but it shows that I set it up and requested it.

not response phone_number data

  1. Check the personal information items that can be received when logging in on the Kakao developer site.
  2. Try OAuth kakao login
  • await supabase.auth.signInWithOAuth(
    OAuthProvider.kakao,
    scopes: "profile_image,name,gender,birthday,birthyear,phone_number"
    )
  1. empty phone data in response data.

Screenshots

image

Version (please complete the following information):
flutter 3.13.9
supabse_flutter ^2.3.3

@lightofjeju lightofjeju added the bug Something isn't working label Feb 21, 2024
@dshukertjr
Copy link
Member

Check the personal information items that can be received when logging in on the Kakao developer site.

@lightofjeju Can you share the URL for this page?

@dshukertjr
Copy link
Member

Also I'm going to transfer this issue to the Auth backend repo as it seems like a backend issue.

@dshukertjr dshukertjr transferred this issue from supabase/supabase-flutter Feb 21, 2024
@dshukertjr dshukertjr removed the auth label Feb 21, 2024
@doong-jo
Copy link

doong-jo commented Mar 2, 2024

@dshukertjr @lightofjeju

https://github.com/supabase/gotrue/blob/757989c1d3856a1dc450c2e0a5cb1c8e0172a6a6/internal/api/provider/kakao.go#L82-L86

It seems to be requested because the above three scopes are always put in by default.

To modify, we need to modify the logic related to scopes, but other providers have the same logic, which seems to be intended maybe.

@lightofjeju
Copy link
Author

lightofjeju commented Mar 5, 2024

@doong-jo

Thank you for your answer.

Then, do you have any intention to make the oauthScopes value customizable?

oh.. sorry..
You're not a superbase developer 😁

@lightofjeju
Copy link
Author

@dshukertjr

hello!
Who should I ask about this issue?

I added the phone_number value to scopes, but I am not receiving the phone_number value.

If this function doesn't work, I can't use the supabase auth and I think I'll have to link it with Kakao directly.. 🥲

@dshukertjr
Copy link
Member

dshukertjr commented Mar 6, 2024

@lightofjeju
Our auth team will have a look at this issue whenever possible. Thanks for your patience.

@MiryangJung
Copy link
Contributor

MiryangJung commented Mar 6, 2024

It can be solved by attaching a trigger to the user table to create an edge function that get additional information from KAKAO.

for example

serve(async (req) => {
  const { record }: WebhookPayload = await req.json();

  const appMetaData = record.raw_app_meta_data as RawAppMetaData;
  const userMetaData = record.raw_user_meta_data as RawUserMetaData;

  if (appMetaData.provider === "kakao") {
    getKakaoUser(record.id, userMetaData);
  }
});

@kangmingtay
Copy link
Member

@lightofjeju that's because the auth service requires these scopes by default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants