Skip to content
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

Added ability to sign in with Passkey #34

Merged
merged 6 commits into from
Dec 13, 2022
Merged

Added ability to sign in with Passkey #34

merged 6 commits into from
Dec 13, 2022

Conversation

mfmurray
Copy link
Contributor

@mfmurray mfmurray commented Dec 6, 2022

Functions to try out

Rownd.connectSignIn(with: .passkey)
Rownd.requestSignIn(with: .passkey)

Requirements to enable Passkey on iOS

  • AppConfig.config.subdomain: "rof"
  • AppConfig.config.capabilities.ios_app: appStore, bundleId, teamId, enabled
  • AppConfig.config.hub.auth.passkeys: enabled, domain

To test with a dev App, you'll need to set the domain extension with .dev.rownd.link
Screen Shot 2022-12-06 at 4 04 16 PM

@mfmurray mfmurray requested a review from mhamann December 6, 2022 21:05
@mfmurray mfmurray marked this pull request as ready for review December 6, 2022 21:06
//Add passkey to the Rownd user
method = PasskeyCoordinatorMethods.SignUp
let anchor: ASPresentationAnchor = (getWindowScene()?.windows.last?.rootViewController?.view.window)!
let bottomSheetController = getWindowScene()?.windows.first?.rootViewController?.presentedViewController as! BottomSheetController
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should just require this to be passed in as a function argument so we don't have to force typecast it, which could result in a crash.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. I added an internal bottomSheetController to the Rownd instance.

I also added guards for iOS versions under 15 for Passkey.


let assertionRequest = publicKeyCredentialProvider.createCredentialAssertionRequest(challenge: challenge)

// Also allow the user to use a saved password, if they have one.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove password request stuff

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

// After the server verifies the userName and password, sign in the user.
// didFinishSignIn()
default:
fatalError("Received unknown authorization type.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to a log statement about unsupported authorization type

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@mhamann mhamann merged commit 7e3943c into main Dec 13, 2022
@mhamann mhamann deleted the _passkey branch December 13, 2022 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants