cordova plugin add https://github.com/mightymop/cordova-plugin-oidc.git
/// <reference types="cordova-plugin-oidc" />
in confix.xml add:
methods:
success = callback error(err:any) = callback with error message
for usage with private LoginApp only! Version 2.0.0 needed
login(success,error);
logout(success,error);
getAccessToken(success,error)
//get current access_token
//if token is expired, function will try to perform a refresh
//result: access_token as string
getIDToken(success,error)
//get current id_token
//result: id_token as string
@deprecated
hasAccount(success(boolean)=>{},error(e)=>{})
//checks if user is logged in
//use isAuthenticated(success(boolean)=>{},error(e)=>{}) instead!
- add config json to login() and logout() as parameter...
e.g.
{
issuer : "https://dc2019.poldom.local/adfs",
clientId: "client-UUID-ID",
scopes: "openid profile email offline_access api",
redirectURI: "myapp.custom.com://",
prompt: true
};
- add the AppGroup group.plugin.cordova.oidc for SSO and SLO (optional)