
Security News
AI Agent Lands PRs in Major OSS Projects, Targets Maintainers via Cold Outreach
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.
@nativescript/apple-sign-in
Advanced tools
A plugin that allows you to authenticate users with Sign In with Apple.
npm install @nativescript/apple-sign-in
Go to the Apple developer and create a new app identifier with the Sign In with Apple Capability enabled. Make sure you sign your app with a provisioning profile using that app identifier.
Add the Sign In with Apple Entitlement to App_Resources/iOS/app.entitlements.
Then add the Sign In with Apple Entitlement to App_Resources/iOS/app.entitlements as follows:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.developer.applesignin</key>
<array>
<string>Default</string>
</array>
</dict>
</plist>
Sign In with Apple was added in iOS 13. So, to check if it is supported on the device, call the static isSupported() method on SignIn.
On iOS < 13 and on Android, isSupported() returns false.
import { SignIn } from "@nativescript/apple-sign-in";
const supported: boolean = SignIn.isSupported();
If Sign In with Apple is supported on the device, you can present the user with that option to sign in.
SignIn.signIn(
{
scopes: ["EMAIL", "FULLNAME"]
})
.then((result: User) => {
console.log("Signed in, user: " + result);
console.log("Signed in, familyName: " + result.fullName.familyName);
this.user = result.user;
})
.catch(err => console.log("Error signing in: " + err));
To get the current Sign In status of a user, call the getState() passing it the user id(User.user) obtained from signIn() method.
import { SignIn } from "@nativescript/apple-sign-in";
const user: string = User.user;
SignIn.getState(user)
.then(state => console.log("Sign in state: " + state))
.catch(err => console.log("Error getting sign in state: " + err));
isSupported: boolean = SignIn.isSupported();
Checks if Sign In with Apple is supported on the device. Returns true for iOS 13+, and false for iOS < 13 and on Android.
SignIn.signIn(
options: SignInOptions
)
.then((result: User) => {
// handle the signed-in user data
})
.catch(err =>{
// handle error
});
Signs in a user with the specified SignInOptions object.
SignIn.getState(userID:string)
.then(state =>{
// do something with user status
})
.catch(err =>{
// handle error
});
Gets the current sign-in status of the user.
| Name | Type | Description |
|---|---|---|
user | string | For the description, visit user. |
scopes | SignInScopes[] | Optional: By default, signIn() does not return any user's scopes. To return the scopes of interest, list them in the scopes array. |
useOnce | boolean | |
nonce | string | Optional: See nonce for more information. |
type SignInScopes = "EMAIL" | "FULL_NAME";
For more details, visit ASAuthorizationScope.
The following are the properties of the User object returned by the signIn() method.
| Name | Type | Description |
|---|---|---|
nonce | string | Optional: See nonce for more information. |
user | string | Always Provided |
fullName | UserFullName | Optional |
realUserStatus | UserDetectionStatus | Optional |
authorizedScopes | SignInScopes | Optional |
identityToken | string | Optional |
email | string | Optional |
identityToken | string | Always Provided |
state | string | Always Provided |
authorizationCode | string | Optional |
For more details, visit ASAuthorizationAppleIDCredential.
| Name | Type | Description |
|---|---|---|
namePrefix | string | Optional |
givenName | string | Optional |
middleName | string | Optional |
familyName | string | Optional |
nameSuffix | string | Optional |
nickname | string | Optional |
For more details, visit NSPersonNameComponents.
enum CredentialState {
Revoked = 'Revoked',
Authorized = 'Authorized',
NotFound = 'NotFound',
Transferred = 'Transferred'
}
For more details, visit ASAuthorizationAppleIDProviderCredentialState.
enum UserDetectionStatus {
Unsupported = 'Unsupported',
Unknown = 'Unknown',
LikelyReal = 'LikelyReal'
}
For more details, visit ASUserDetectionStatus.
Apache License Version 2.0
FAQs
Sign In With Apple
The npm package @nativescript/apple-sign-in receives a total of 305 weekly downloads. As such, @nativescript/apple-sign-in popularity was classified as not popular.
We found that @nativescript/apple-sign-in demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.

Research
/Security News
Chrome extension CL Suite by @CLMasters neutralizes 2FA for Facebook and Meta Business accounts while exfiltrating Business Manager contact and analytics data.

Security News
After Matplotlib rejected an AI-written PR, the agent fired back with a blog post, igniting debate over AI contributions and maintainer burden.