Closed SquaredLab closed 1 year ago
Here is the code of the function:
@discardableResult public func signIn(credential: OpenIDConnectCredentials) async throws -> Session { let session = try await Env.client.send( Paths.token.post( grantType: .idToken, .openIDConnectCredentials(credential) )).value if session.user.confirmedAt != nil { try await Env.sessionManager.update(session) authEventChangeContinuation.yield(.signedIn) } return session }
It would be very handy to have in the client a public method for signing in with OpenIDConnectCredentials in order to accomplish the Apple Sign In flow.
Here is the code of the function: