Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "starter",
"name": "angular-oauth2-oidc",
"version": "10.0.2",
"license": "MIT",
"scripts": {
Expand Down
11 changes: 10 additions & 1 deletion projects/lib/src/oauth-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2543,8 +2543,17 @@ export class OAuthService extends AuthConfig implements OnDestroy {
"loginUrl must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS)."
);
}

let addParams = {};
let loginHint = null;
if (typeof params === 'string') {
loginHint = params;
}
else if (typeof params === 'object') {
addParams = params;
}

this.createLoginUrl(additionalState, '', null, false, params)
this.createLoginUrl(additionalState, loginHint, null, false, addParams)
.then(this.config.openUri)
.catch(error => {
console.error('Error in initAuthorizationCodeFlow');
Expand Down