Skip to main content
Version: 3.x

Microsoft Edge (Pre-Chromium) Support

Note: These steps are only required if you need to support pre-Chromium Edge browsers. If you are creating a pure hybrid-native app or otherwise have no reason to support pre-Chromium Edge, then you can override methods like isAuthenticated() in the usual manner.

Due to a bug in the pre-Chromium version of Edge, you cannot overide a method in a subclass.

For instance, it is common to create a class that extends IonicAuth like this:


_10
export class AuthenticationService extends IonicAuth {
_10
private vaultService: VaultService;
_10
...
_10
async isAuthenticated(): Promise<boolean> {
_10
const isVaultLocked = await this.vaultService.isLocked();
_10
return !isVaultLocked && (await super.isAuthenticated());
_10
}
_10
...
_10
}

If you need to support the pre-Chromium version of Edge, you will need to write your own method in the subclass that calls into the base class as follows:


_10
export class AuthenticationService extends IonicAuth {
_10
private vaultService: VaultService;
_10
...
_10
async myAppIsAuthenticated(): Promise<boolean> {
_10
const isVaultLocked = await this.vaultService.isLocked();
_10
return !isVaultLocked && (await super.isAuthenticated());
_10
}
_10
...
_10
}

You will then need to change external references from this.authentication.isAuthenticated() to this.authentication.myAppIsAuthenticated() (the name is not important so much as the fact that you are not overriding the base class method, pick a name that makes sense to you).

You will also need to use the CURRENT behavior for implicitLogin on Edge.