Git Product home page Git Product logo

Comments (10)

ImHamzaAnwer avatar ImHamzaAnwer commented on July 18, 2024 1

still receiving null in fullName

from react-native-apple-authentication.

arunkmoury avatar arunkmoury commented on July 18, 2024

Same here with 0.61.2 & 0.57.8

from react-native-apple-authentication.

jacksonej avatar jacksonej commented on July 18, 2024

I hard coded the scopes in Appleauthentication Xcode project. then it started working. looks like scopes are not getting in Apple native

from react-native-apple-authentication.

vonrussel avatar vonrussel commented on July 18, 2024

Change scopes to requestedScopes here:
https://github.com/SystangoTechnologies/react-native-apple-authentication/blob/master/index.js#L13

from react-native-apple-authentication.

Estebank94 avatar Estebank94 commented on July 18, 2024

Change scopes to requestedScopes here:
https://github.com/SystangoTechnologies/react-native-apple-authentication/blob/master/index.js#L13

I tried that but it still isn't working

from react-native-apple-authentication.

iamgerardm avatar iamgerardm commented on July 18, 2024

So a couple things here... requestedScopes does fix the issue of it asking for name and email during sign in. However, due to Apple policies this information is only returned the very first time it's asked for. After that the user would have to revoke the sign in permissions in Settings > [NAME] > Passwords & Security > Apps Using Your Apple ID

This worked for email, however I also had to change the code in AppleAuthentication.m around line 77.

NSDictionary* user = @{ @"firstName": RCTNullIfNil(credential.fullName.givenName), @"lastName": RCTNullIfNil(credential.fullName.familyName), @"email": RCTNullIfNil(credential.email), @"user": credential.user, @"authorizedScopes": credential.authorizedScopes, @"realUserStatus": @(credential.realUserStatus), @"state": RCTNullIfNil(credential.state), @"authorizationCode": RCTNullIfNil(credential.authorizationCode), @"identityToken": RCTNullIfNil(credential.identityToken) };

I changed fullName to firstName and lastName as just .fullName does not return anything.

from react-native-apple-authentication.

amourya-systango avatar amourya-systango commented on July 18, 2024

Change scopes to requestedScopes here:
https://github.com/SystangoTechnologies/react-native-apple-authentication/blob/master/index.js#L13

@vonrussel Thanks, I have replaced scopes with requestedScopes and it worked.

from react-native-apple-authentication.

amourya-systango avatar amourya-systango commented on July 18, 2024

Change scopes to requestedScopes here:
https://github.com/SystangoTechnologies/react-native-apple-authentication/blob/master/index.js#L13

I tried that but it still isn't working
@Estebank94 Thanks, I have replaced scopes with requestedScopes and it worked.

from react-native-apple-authentication.

amourya-systango avatar amourya-systango commented on July 18, 2024

@iamgerardm I am getting Fullname after this, please take the latest code and check if it's working now or not.

from react-native-apple-authentication.

amourya-systango avatar amourya-systango commented on July 18, 2024

No activities. Closing this issue for now

from react-native-apple-authentication.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.