On login method getToken added to else

This commit is contained in:
Eudes Inácio
2021-10-13 08:38:11 +01:00
parent 9ef5a63d40
commit e62be59e89
3 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
<name>gabinete digital</name>
<description>An awesome Ionic/Cordova app.</description>
<author email="hi@ionicframework.com" href="http://ionicframework.com/">Ionic Framework Team</author>
<content original-src="index.html" src="http://localhost:8100" />
<content src="index.html" />
<access origin="*" />
<allow-navigation href="*" />
<allow-navigation href="*" />
+1
View File
@@ -108,6 +108,7 @@ export class LoginPage implements OnInit {
this.changeProfileService.run()
await this.authService.loginChat(this.userattempt);
this.getToken();
this.router.navigate(['/pin']);
}
+3 -1
View File
@@ -108,7 +108,9 @@ export class NotificationsService {
window['MFPPush'].registerDevice(null, async (successResponse) => {
console.log("Successfully registered: " + JSON.stringify(successResponse));
console.log('token: ', successResponse.deviceId)
await this.storageService.store(username, successResponse.deviceId);
await this.storageService.store(username, successResponse.deviceId).then((tokennoti) => {
console.log('token store',tokennoti)
});
await this.storageService.get(username).then(value => {
console.log('STORAGE TOKEN', value)
this.storageService.get(AuthConnstants.USER).then(res => {