Skip to content

Commit

Permalink
update sign in with apple function call
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepitre committed Jan 29, 2025
1 parent cd0623a commit a529c7c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ struct AuthSocialProvidersView: View {
}

private func authenticateWithApple() async throws -> TransferFlowResult {
let appleIdCredential = try await SignInWithAppleHelper().getAppleIdCredential()
let appleIdCredential = try await SignInWithAppleHelper.getAppleIdCredential()

guard let idToken = appleIdCredential.identityToken.flatMap({ String(data: $0, encoding: .utf8) }) else {
throw ClerkClientError(message: "Unable to get ID token from Apple ID Credential.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ struct SignInFactorOneAlternativeMethodsView: View {
}

private func signInWithApple() async throws -> TransferFlowResult {
let appleIdCredential = try await SignInWithAppleHelper().getAppleIdCredential()
let appleIdCredential = try await SignInWithAppleHelper.getAppleIdCredential()

guard let idToken = appleIdCredential.identityToken.flatMap({ String(data: $0, encoding: .utf8) }) else {
throw ClerkClientError(message: "Unable to get ID token from Apple ID Credential.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ extension UserProfileAddExternalAccountView {

guard let user else { throw ClerkClientError(message: "Unable to find the current user.") }

let credential = try await SignInWithAppleHelper().getAppleIdCredential()
let credential = try await SignInWithAppleHelper.getAppleIdCredential()

guard let idToken = credential.identityToken.flatMap({ String(data: $0, encoding: .utf8) }) else {
throw ClerkClientError(message: "Unable to find your Apple ID credential.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ struct UserProfileExternalAccountSection: View {

guard let user else { throw ClerkClientError(message: "Unable to find the current user.") }

let credential = try await SignInWithAppleHelper().getAppleIdCredential()
let credential = try await SignInWithAppleHelper.getAppleIdCredential()

guard let idToken = credential.identityToken.flatMap({ String(data: $0, encoding: .utf8) }) else {
throw ClerkClientError(message: "Unable to find your Apple ID credential.")
Expand Down

0 comments on commit a529c7c

Please sign in to comment.