-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
70e08dd
commit dbe9290
Showing
2 changed files
with
16 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,11 +22,23 @@ import { signInWithApple } from 'node-mac-sign-in-with-apple'; | |
|
||
ipcMain.on('sign-in-with-apple', async () => { | ||
const nativeWindow = mainWindow.getNativeWindowHandle(); | ||
const data = await signInWithApple(nativeWindow); | ||
|
||
try { | ||
const data = await signInWithApple(nativeWindow); | ||
// { | ||
// idToken: 'TOKEN', | ||
// firstName: 'John', | ||
// middleName: 'Chris', | ||
// lastName: 'Doe', | ||
// email: '[email protected]' | ||
// } | ||
} catch(err) { | ||
// { code: 1000, message: 'Error message' } | ||
} | ||
}) | ||
``` | ||
|
||
> Note: Only on first login Apple returns email and user name, on other requests | ||
> **Note:** Only on first login Apple returns email and user name, on other requests | ||
> Apple returns only **idToken** | ||
|
||
|
@@ -40,7 +52,7 @@ Add to entitlements.plist | |
``` | ||
## Thanks | ||
|
||
Big thanks to [**@dynbit**](https://github.com/dynbit) for his help! | ||
Big thanks to [**@dynbit**](https://github.com/dynbit) for his help and contribution! | ||
|
||
## License | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters