OidcWeb

public extension OidcWeb
  • Creates an OIDC login instance with the provided configuration block.

    Declaration

    Swift

    static func createOidcWeb(block: @Sendable (OidcWebConfig) -> Void = {_ in }) -> OidcWeb

    Parameters

    block

    A 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

    configure

    A closure to configure the OIDC options.

    Return Value

    A Result containing the User or an OidcError.

  • user() Asynchronous

    Method 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() Asynchronous

    Alias for the Browser.user() method.

    Declaration

    Swift

    func oidcLoginUser() async -> User?

    Return Value

    The user if found, otherwise nil.