Skip to content
This repository was archived by the owner on Oct 22, 2024. It is now read-only.

Add hostedAuth method for Hosted Login #93

Merged
merged 11 commits into from
Jul 15, 2024
Merged

Conversation

rickycpadilla
Copy link
Contributor

@rickycpadilla rickycpadilla commented Jul 2, 2024

What's new

Hosted Login

A faster and easier way to add passkey support to your iOS app.
Developers can now call passage.hostedAuth(in: clientSecret:) to display a Passage login web view for easy passkey authentication.

Example code

func onPressSignIn() async {
    do {
          let authResult = try await passage.hostedAuth(clientSecret: "YOUR_OIDC_CLIENT_SECRET")
          navigateToHomeViewController(token: authResult.authToken)
      } catch {
          print(error)
      }
}

func onPressSignOut() async {
    do {
          try await passage.hostedLogout()
          navigateToLoginViewController()
      } catch {
          print(error)
      }
}

Demo

Simulator.Screen.Recording.-.iPhone.15.-.2024-07-02.at.10.20.17.mp4

@rickycpadilla rickycpadilla marked this pull request as ready for review July 10, 2024 01:13
@rickycpadilla rickycpadilla requested a review from a team as a code owner July 10, 2024 01:13
Copy link

@rickycpadilla rickycpadilla merged commit f6c26b0 into main Jul 15, 2024
4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants