Skip to content

Add sample for MAUI B2C custom flow #112

@JoacimWall

Description

@JoacimWall

Hi try to follow your code to implement MSAL in a Maui app for iOS and Android. We have two different policys (custom html views) one for login and one for signup. I have som questions that I can't find any solution to in your docs or code.

  1. In your sample code you just set this once in the constructor

.WithB2CAuthority($"{AzureADB2CConfig.Instance}/tfp/{AzureADB2CConfig.Domain}/{AzureADB2CConfig.SignUpSignInPolicyid}")

There is no code that show how to switch policy.

1.1. if I first have the policy signup and do the signup and later want to change to SignIn policy and request token silent I get SingIn web view. So there is no way to switch policy without get Webview. In a normal onboarding senario in an app you first signup and when that is done you want the url to change to SingIn if the token should expire when we use get token silent.

1.2 I have tested to request the token with no policy like the url below and on MsalUiRequiredException add the requested Policy
.WithB2CAuthority($"{AzureADB2CConfig.Instance}/tfp/{AzureADB2CConfig.Domain}
But then the backend team that use the token says that the oid gets [00000-000xxxx] when the use the token on there side. It has value on my side before I send it.

  1. When we use the .WithUseEmbeddedWebView(true) flag we want the user not to leve the app. This work on iOS but on Android the web view trigger the app events OnSleep and OnResume. Is this a bug or something that needs to be configured.

//Thanks Joacim

This issue is for a: (mark with an x)

- [x ] feature request
- [ x] documentation issue or request



### OS and Version?
> Ios and Android

> Thanks! We'll be in touch soon.

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