Only the information requested by the scope is not imported. and not response phone_number data
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
- Check the personal information items that can be received when logging in on the Kakao developer site.
- Try OAuth kakao login
- await supabase.auth.signInWithOAuth( OAuthProvider.kakao, scopes: "profile_image,name,gender,birthday,birthyear,phone_number" )
- It says it's an incorrect request.
- I didn't request profile_nickname, but it shows that I set it up and requested it.
not response phone_number data
- Check the personal information items that can be received when logging in on the Kakao developer site.
- Try OAuth kakao login
- await supabase.auth.signInWithOAuth( OAuthProvider.kakao, scopes: "profile_image,name,gender,birthday,birthyear,phone_number" )
- empty phone data in response data.
Screenshots
Version (please complete the following information): flutter 3.13.9 supabse_flutter ^2.3.3
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?
Also I'm going to transfer this issue to the Auth backend repo as it seems like a backend issue.
@dshukertjr
scope settings page
- https://developers.kakao.com/console/app/1037204/product/login/scope ( This page requires a Kakao login. )
kakao error url
- https://kauth.kakao.com/oauth/authorize?client_id=ad984dd9054b7bf27410f4425dc31901&flow_type=pkce&redirect_uri=https%3A%2F%2Ftpagdfpibubnmmjfdlnh.supabase.co%2Fauth%2Fv1%2Fcallback&response_type=code&scope=account_email+profile_image+profile_nickname+profile_image+name+gender+birthday+birthyear+phone_number&state=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MDg1MDAzMzgsInNpdGVfdXJsIjoiY29tLmV4YW1wbGUuY2h1cmNoOi8vb2F1dGgiLCJpZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCIsImZ1bmN0aW9uX2hvb2tzIjpudWxsLCJwcm92aWRlciI6Imtha2FvIiwicmVmZXJyZXIiOiJjb20uZXhhbXBsZS5jaHVyY2g6Ly9vYXV0aCIsImZsb3dfc3RhdGVfaWQiOiJmOWI1OTI5OS1lMGVhLTQzMzUtYjZkYi0yYmI5YWJjMjY3ZGUifQ.abg9e9SqjFXJ1I96DKmbpE0uf0IRUyqy_UaTgL1VlKY
And when I checked the auth log in the suppbase dashboard, I didn't receive not only the phone but also the birthdat birthyaer data.
@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.
@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 😁
@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.. 🥲
@lightofjeju Our auth team will have a look at this issue whenever possible. Thanks for your patience.
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);
}
});
@lightofjeju that's because the auth service requires these scopes by default