Skip to content
This repository was archived by the owner on Aug 10, 2026. It is now read-only.
This repository was archived by the owner on Aug 10, 2026. It is now read-only.

Support for generic OIDC #63

Description

@ktkk

We use Firebase auth in conjunction with our own OIDC backend and this works somewhat ok with the firebase_auth package on Android and iOS. We are looking into this package now because our requirements changed and we need a Windows application for our users too.

I've tried implementing this myself by extending from ProviderArgs, but I can't get it to work.

class OAuthSignInArgs extends ProviderArgs {
  OAuthSignInArgs({
    required this.host,
    required this.path,
    required this.redirectUri,
    required this.clientId,
    this.scopes = const [],
    this.responseType = 'code',
    String? nonce,
  }) : nonce = nonce ?? generateNonce();

  @override
  final String host;

  @override
  final String path;

  @override
  final String redirectUri;

  final String clientId;
  final List<String> scopes;
  final String responseType;
  final String nonce;

  @override
  Map<String, String> buildQueryParameters() => {
        'response_type': responseType,
        'client_id': clientId,
        'scope': scopes.join(' '),
        'redirect_uri': redirectUri,
        'nonce': sha256.convert(utf8.encode(nonce)).toString(),
      };
}

I'd love to know what I'm doing wrong here. The callback url I get back from Firebase directs me to a page saying the following:

Unable to process request due to missing initial state. This may happen if browser sessionStorage is inaccessible or accidentally cleared. Some specific scenarios are - 1) Using IDP-Initiated SAML SSO. 2) Using signInWithRedirect in a storage-partitioned browser environment.

Any feedback would be greatly appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions