firebase / firebase/flutterfire
firebase_auth: SAMLAuthProvider throws an error with loginWithSSOProvider
- Dominant language
- Dart
- Stars
- 9.3k
- Forks
- 4.1k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 53
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues.
### Which plugins are affected?
Auth
### Which platforms are affected?
iOS
### Description
When `signInWithProvider` is called with `SAMLAuthProvider`, the login seems successful but it throws an error like below:
`loginWithSSOProvider error: type 'String' is not a subtype of type 'Map?'`
### Reproducing the issue
```
final provider = SAMLAuthProvider('saml.mycompany.com');
UserCredential userCredential = await FirebaseAuth.instance.signInWithProvider(provider);
```
### Firebase Core version
3.10.0
### Flutter Version
3.22.3
### Relevant Log Output
```shell
Error received from Flutter ["exceptionDescription": type 'String' is not a subtype of type 'Map?'#0 platformExceptionToFirebaseAuthException (package:firebase_auth_platform_interface/src/method_channel/utils/exception.dart:47:25), "stackTraceDescription": #0 platformExceptionToFirebaseAuthException (package:firebase_auth_platform_interface/src/method_channel/utils/exception.dart:47:25)
#1 convertPlatformException (package:firebase_auth_platform_interface/src/method_channel/utils/exception.dart:26:5)
#2 MethodChannelFirebaseAuth.signInWithProvider (package:firebase_auth_platform_interface/src/method_channel/method_channel_firebase_auth.dart:405:7)
#3 FirebaseAuth.signInWithProvider (package:firebase_auth/src/firebase_auth.dart:641:9)
]
```
### Flutter dependencies
Expand Flutter dependencies snippet
```
Dart SDK 3.4.4
Flutter SDK 3.22.3
dependencies:
...
- firebase_auth: ^5.4.0
- firebase_core: ^3.10.0
...
```
### Additional context and comments
Android also throws an error but it it different with iOS. The Android throws below error.
`loginWithSSOProvider error: [firebase_auth/unknown] https://myproject.firebaseapp.com/__/auth/handler?providerId= saml.mycompany.com `
Contributor guide
Assessment
This issue has not been assessed yet.