-
Notifications
You must be signed in to change notification settings - Fork 14
Apple Auth start #58
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
Merged
Merged
Apple Auth start #58
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
8d7aded
Apple Auth start
AnthonyRonning 8f24af3
Attempt apple oauth
AnthonyRonning 41922b8
Remove apple non-native signin
AnthonyRonning 19f254f
Bump opensecret
AnthonyRonning a77b832
iOS auth cleanup
AnthonyRonning d9ecdde
Add apple nonce parameter
AnthonyRonning File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # Sign in with Apple Integration for iOS | ||
|
|
||
| ## Overview | ||
| This document provides information about the Sign in with Apple integration for Maple on iOS. | ||
|
|
||
| ## Configuration | ||
| 1. The integration uses the tauri-plugin-sign-in-with-apple crate (version 1.0.0) | ||
| 2. Required entitlements have been added in maple_iOS.entitlements | ||
| 3. The capability is registered in capabilities/default.json and capabilities/mobile-ios.json | ||
|
|
||
| ## Frontend Implementation | ||
| 1. Apple Sign In button is only shown on iOS devices | ||
| 2. Platform detection via `@tauri-apps/plugin-os`'s `type()` function | ||
| 3. Authentication is handled through the plugin's command: `plugin:sign-in-with-apple|get_apple_id_credential` | ||
|
|
||
| ## Future Backend Work | ||
| The frontend implementation for Apple Sign In is complete, but the backend integration is not yet implemented. | ||
| When the backend is ready, the response from the Apple Sign In should be sent to your backend to: | ||
|
|
||
| 1. Verify the identity token with Apple | ||
| 2. Create or update the user account | ||
| 3. Generate authentication tokens for your app | ||
|
|
||
| ## Debugging | ||
| If you experience issues with Sign in with Apple: | ||
| 1. Check the debug logs (debug option is enabled) | ||
| 2. Verify that the entitlements are properly set | ||
| 3. Ensure your Apple Developer account is configured correctly for Sign in with Apple | ||
|
|
||
| ## Resources | ||
| - [Apple Developer Documentation](https://developer.apple.com/documentation/sign_in_with_apple) | ||
| - [tauri-plugin-sign-in-with-apple on crates.io](https://crates.io/crates/tauri-plugin-sign-in-with-apple) |
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -18,6 +18,7 @@ | |
| "url": "https://trymaple.ai/*" | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| "sign-in-with-apple:default" | ||
| ] | ||
| } | ||
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| { | ||
| "$schema": "../gen/schemas/mobile-schema.json", | ||
| "identifier": "mobile-ios", | ||
| "description": "Capabilities for iOS", | ||
| "windows": [ | ||
| "main" | ||
| ], | ||
| "platforms": ["iOS"], | ||
| "permissions": [ | ||
| "core:default", | ||
| "updater:default", | ||
| { | ||
| "identifier": "opener:allow-open-url", | ||
| "allow": [ | ||
| { | ||
| "url": "http://localhost:5173/*" | ||
| }, | ||
| { | ||
| "url": "https://trymaple.ai/*" | ||
| } | ||
| ] | ||
| }, | ||
| "sign-in-with-apple:default" | ||
| ] | ||
| } |
This file contains hidden or 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
This file contains hidden or 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
|
AnthonyRonning marked this conversation as resolved.
|
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| import React from "react"; | ||
|
|
||
| export function Apple(props: React.SVGProps<SVGSVGElement>) { | ||
| return ( | ||
| <svg | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| width="24" | ||
| height="24" | ||
| viewBox="0 0 24 24" | ||
| fill="none" | ||
| stroke="currentColor" | ||
| strokeWidth="2" | ||
| strokeLinecap="round" | ||
| strokeLinejoin="round" | ||
| {...props} | ||
| > | ||
| <path d="M12 20.94c1.5 0 2.75 1.06 4 1.06 3 0 6-8 6-12.22A4.91 4.91 0 0 0 17 5c-2.22 0-4 1.44-5 2-1-.56-2.78-2-5-2a4.9 4.9 0 0 0-5 4.78C2 14 5 22 8 22c1.25 0 2.5-1.06 4-1.06Z" /> | ||
| <path d="M10 2c1 .5 2 2 2 5" /> | ||
| </svg> | ||
| ); | ||
| } |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.