-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
public changes for passkey support #11546
Draft
Xiaoshouzi-gh
wants to merge
13
commits into
passkey-main
Choose a base branch
from
passkey-api-proposal
base: passkey-main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 5 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
c8db684
public changes for passkey support
Xiaoshouzi-gh 51ed7dd
fix API_UNAVAILABLE on watchOS issue
Xiaoshouzi-gh 9eb27b5
add iOS only for FIRPasskey APIs
Xiaoshouzi-gh 33d9737
update API proposal
Xiaoshouzi-gh 00f092f
mark passkey unavailable for watch, tv and mac OS
Xiaoshouzi-gh 21d092d
sample code change API proposal
Xiaoshouzi-gh e6fc76c
update based on API proposal feedback
Xiaoshouzi-gh cb7132c
Revert "sample code change API proposal"
Xiaoshouzi-gh 67a5545
Tweak NS_SWIFT_NAME usage
ncooke3 298510e
Adding optional name input to startPasskeyEnrollment API
Xiaoshouzi-gh a534f36
Adding target tags around passkey APIs
Xiaoshouzi-gh b401cfd
update import
Xiaoshouzi-gh d2c8abe
update AS imports
Xiaoshouzi-gh 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
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
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Copyright 2023 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
/** | ||
@class FIRPasskey | ||
@brief Passkey Info | ||
*/ | ||
NS_SWIFT_NAME(Passkey) API_UNAVAILABLE(macos, tvos, watchos) @interface FIRPasskey : NSObject | ||
|
||
/** | ||
@brief Passkey name | ||
*/ | ||
@property(nonatomic, readonly) NSString *name; | ||
|
||
/** | ||
@brief Passkey credential ID | ||
*/ | ||
@property(nonatomic, readonly) NSString *credentialID; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paulb777, should types from this framework instead be forward declared within the header?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, and wrapped in
#if TARGET_OS_IOS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you elaborate on the forward declaration part?
another question on TARGET_OS_IOS, these APIs will run on mac os, ios and tv os (but not watch OS).
I was thinking using
if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_MAC
. However going thru this doc, I have the assumption that TARGET_OS_MAC will include all IOS, TVOS and WATCHOS, can you suggest?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So line 20 should be moved to the implementation file. And in its place should be forward declarations for the types used from the
AuthenticationServices
module. The diff should look like:TARGET_OS_MAC
might be too broad. Something like the following should specifically get all platforms except watchOS:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you Nick. After trying the suggestion we synced offline, it seems importing in the .m file still cause me compiler errors. Can you help me take a look where I might did wrong? (CI is also failing for the same issue)