diff --git a/package.json b/package.json index 55c461ee..48562f80 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "starter", + "name": "angular-oauth2-oidc", "version": "10.0.2", "license": "MIT", "scripts": { diff --git a/projects/lib/src/oauth-service.ts b/projects/lib/src/oauth-service.ts index 6f0bce0f..488fde7e 100644 --- a/projects/lib/src/oauth-service.ts +++ b/projects/lib/src/oauth-service.ts @@ -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');