Auto login a user to OAUTH authType

cancel
Showing results for 
Search instead for 
Did you mean: 
jamilnour
Established Member

Auto login a user to OAUTH authType

Hello,

In my application business logic I have a special case when I need to auto login a pre-registered user. To do so I am using the ADF AuthenticationService. Everything is working fine:

            this.auth.login('myusrname', 'mypassword').subscribe(
              token => {
                  console.log(token);
              },
              error => {
                  console.log(error);
              }
          );
Recentely we activated Alfresco Identity Service and I changed the authtype value from basic to OAUTH in app.config.json
 
The application is working fine but for my special component when trying to login to the predefined user the call above  is no more working.
 
Is there a call in AuthenticationService or AlfrescoApiService that I can call use to auto login this user when OAUTH is enabled? How?
 
Thank you
Jamil