Missed state when create a new UserAgentApplication
See original GitHub issueI’m submitting a…
[ ] Regression (a behavior that used to work and stopped working in a new release)
[X] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:
Browser:
- Chrome version XX
- Firefox version XX
- IE version XX
- Edge version XX
- Safari version XX
Library version
Library version: 1.0.2
## Current behavior
In Configuration.ts we have the following lines to describe and define AuthOptions:
/**
* @type AuthOptions: Use this to configure the auth options in the Configuration object
*
* - clientId - Client ID of your app registered with our Application registration portal : https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview in Microsoft Identity Platform
* - authority - You can configure a specific authority, defaults to " " or "https://login.microsoftonline.com/common"
* - validateAuthority - Used to turn authority validation on/off. When set to true (default), MSAL will compare the application's authority against well-known URLs templates representing well-formed authorities. It is useful when the authority is obtained at run time to prevent MSAL from displaying authentication prompts from malicious pages.
* - redirectUri - The redirect URI of the application, this should be same as the value in the application registration portal.Defaults to `window.location.href`.
* - postLogoutRedirectUri - Used to redirect the user to this location after logout. Defaults to `window.location.href`.
* - state - Use to send the state parameter with authentication request
* - navigateToLoginRequestUrl - Used to turn off default navigation to start page after login. Default is true. This is used only for redirect flows.
*
*/
export type AuthOptions = {
clientId: string;
authority?: string;
validateAuthority?: boolean;
redirectUri?: string | (() => string);
postLogoutRedirectUri?: string | (() => string);
navigateToLoginRequestUrl?: boolean;
};
## Expected behavior
As you can see in the comments below, is an state propertie, that is missing in the type AuthOptions
## Minimal reproduction of the problem with instructions
If is not included since new versions, how can I manage it, and pass state? I need it to control state after callback in SignIn or EditProfile policies
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
Handle errors and exceptions in MSAL.js - Microsoft Entra
This article gives an overview of the different types of errors and recommendations for handling common sign-in errors. MSAL error handling ...
Read more >fable-compiler/Fable - Gitter
var userAgentApplication = new Msal.UserAgentApplication(applicationConfig. ... i restarted fable dotnet fable npm-start and also my backend server.
Read more >msal | Yarn - Package Manager
MSAL for JavaScript enables client-side JavaScript web applications, running in a web browser, to authenticate users using Azure AD work and school accounts ......
Read more >AzureAD/microsoft-authentication-library-for-js | Job 2
Data type to hold information about state returned from the server ... Constructor for the UserAgentApplication used to instantiate the UserAgentApplication ...
Read more >Unable to create UserAgentApplication with Microsoft ...
As @fortunee indicated, UserAgentApplication is not for @azure/msal-node , you should use ConfidentialClientApplication or ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@pkanher617 I got tslint error when try to pass state property, because its not defined in type
@dluque92 as @pkanher617 mentioned above, AuthenticationParameters.ts class has the detail on how to send the ‘state’ per request. Closing this issue as #780 is in dev.