OidcWeb
public extension OidcWeb
-
Creates an OIDC login instance with the provided configuration block.
Declaration
Swift
static func createOidcWeb(block: @Sendable (OidcWebConfig) -> Void = {_ in }) -> OidcWebParameters
blockA closure to configure the OIDC options.
Return Value
An instance of OidcWeb configured for OIDC login.
-
authorize(configure:Asynchronous) This method initializes the OIDC client and starts the login process.
Declaration
Swift
func authorize(configure: @Sendable (inout OidcOptions) -> Void = { _ in }) async throws -> Result<User, OidcError>Parameters
configureA closure to configure the OIDC options.
Return Value
A Result containing the User or an OidcError.
-
user()AsynchronousMethod to return the OIDC user. This method checks if the OIDC client is initialized and sets up the necessary configurations.
Declaration
Swift
func user() async -> User?Return Value
The user if found, otherwise nil.
-
oidcLoginUser()AsynchronousAlias for the Browser.user() method.
Declaration
Swift
func oidcLoginUser() async -> User?Return Value
The user if found, otherwise nil.
View on GitHub