Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Confusing transient MS views when signing in #13

Open
SteveDCronin opened this issue Sep 11, 2019 · 0 comments
Open

Confusing transient MS views when signing in #13

SteveDCronin opened this issue Sep 11, 2019 · 0 comments
Labels

Comments

@SteveDCronin
Copy link

SteveDCronin commented Sep 11, 2019

I'm using CocoaPods with:
...
pod 'MSGraphClientSDK'
pod 'MSGraphClientModels'
pod 'MSGraphMSALAuthProvider'

When I try and authorize on an iPad I see a very confusing set of Microsoft views drawn onscreen. So confusing that it makes me wonder if I a configuration misstep...

The App is registered on AzureActiveDirectory - it functions more or less correctly. So the base functionality is sound. This issue concerns the number of views that are drawn onscreen during authorization.

The App Type is Public Client (Web). It has a custom redirectURI - but, interestingly, this redirect is never called in the code shown below.
On the Azure Authentication view, the App has 'NO' selected for both:
Live SDK Support and Default Client Type

authority = [[MSALAADAuthority alloc] initWithURL:[NSURL URLWithString:@"https://login.microsoftonline.com/common"] error:&initError];
config = [[MSALPublicClientApplicationConfig alloc] initWithClientId:**kClientID** redirectUri:nil authority:authority];
applicationContext = [[MSALPublicClientApplication alloc] initWithConfiguration:config error:&initError];
    msalScopes = @[graphContactScope,graphCategoryScope];
MSALInteractiveTokenParameters *interactiveParams = [[MSALInteractiveTokenParameters alloc] initWithScopes:msalScopes];
[applicationContext acquireTokenWithParameters:interactiveParams completionBlock:^(MSALResult *result, NSError *interactiveTokenError) {
	if (interactiveTokenError==nil) {
		if (result==nil) {
			NSLog(@"%s ERROR: no token returned",__func__);
		} else {
			if ((result.accessToken!=nil)&&(result.accessToken.length>0)) {
				[MyAppKeychain savePasswordToKeychainForName:office365KeychainItemName password:result.accessToken];
			}
		}
	} else {
		NSLog(@"%s interactiveTokenError: %@",__func__,interactiveTokenError);
	}
}];

The first view is this:
WantsToSignIn

The name shown in the navBar at the top of the screen changes from 'login.microsoft' to 'login.live' to 'account.live.com'. There are also a few different views that flash briefly onscreen... When things finally settle down this view is shown:
TryingToSignIn

Is this the expected behavior?

AB#7060

@ghost ghost added the ToTriage label Sep 11, 2019
@ddyett ddyett added the promote label Jan 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants