Skip to content

Commit 6dbefc9

Browse files
authored
docs(enterprise): update auth-connect plugin file (ionic-team#1232)
* docs(enterprise): update auth-connect plugin file * Add 1.5.0 info
1 parent d4dc1d6 commit 6dbefc9

1 file changed

Lines changed: 190 additions & 11 deletions

File tree

‎src/pages/enterprise/auth-connect.md‎

Lines changed: 190 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: Auth Connect
33
template: enterprise-plugin
4-
version: 1.3.5
5-
minor: 1.3.X
4+
version: 1.5.0
5+
minor: 1.5.X
66
---
77

88
Ionic Auth Connect handles logging in and/or registering a user with an authentication provider (such as Auth0, Azure AD, or AWS Cognito) using industry standard OAuth/OpenId Connect on iOS, Android, or on the web.
@@ -85,16 +85,12 @@ It is common to create a class that extends `IonicAuth` like this:
8585
})
8686
export class AuthenticationService extends IonicAuth {
8787
private vaultService: VaultService;
88-
8988
...
90-
9189
async isAuthenticated(): Promise<boolean> {
9290
const isVaultLocked = await this.vaultService.isLocked();
9391
return !isVaultLocked && (await super.isAuthenticated());
9492
}
95-
9693
...
97-
9894
}
9995
```
10096

@@ -106,16 +102,12 @@ However, due to a bug in the pre-Chromium version of Edge, you cannot overide a
106102
})
107103
export class AuthenticationService extends IonicAuth {
108104
private vaultService: VaultService;
109-
110105
...
111-
112106
async myAppIsAuthenticated(): Promise<boolean> {
113107
const isVaultLocked = await this.vaultService.isLocked();
114108
return !isVaultLocked && (await super.isAuthenticated());
115109
}
116-
117110
...
118-
119111
}
120112
```
121113

@@ -216,6 +208,7 @@ You can find the API and interface documentation for everything below. The main
216208
* [IVConfig](#ivconfig)
217209
* [IVUserInterface](#ivuserinterface)
218210
* [IonicAuthOptions](#ionicauthoptions)
211+
* [IonicGeneralAuthOptions](#ionicgeneralauthoptions)
219212
* [TokenStorageProvider](#tokenstorageprovider)
220213
* [VaultInterface](#vaultinterface)
221214

@@ -490,7 +483,7 @@ ___
490483

491484
### `<Optional>` authConfig
492485

493-
**● authConfig**: *"auth0" \| "azure" \| "cognito"*
486+
**● authConfig**: *"auth0" \| "azure" \| "cognito" \| "general"*
494487

495488
The type of the Auth Server, currently only the following are supported:
496489

@@ -597,6 +590,171 @@ ___
597590

598591
The type of storage to use for the tokens
599592

593+
___
594+
<a id="ionicauthoptions.webauthflow"></a>
595+
596+
### `<Optional>` webAuthFlow
597+
598+
**● webAuthFlow**: *"implicit" \| "PKCE"*
599+
600+
Authentication flow to use on web defaults to: `implicit` `PKCE` is not supported by Azure, if `authConfig` is set to `azure` the plugin will use `implicit` despite `webAuthFlow` value
601+
602+
___
603+
604+
___
605+
<a id="ionicgeneralauthoptions"></a>
606+
607+
### IonicGeneralAuthOptions
608+
609+
**IonicGeneralAuthOptions**:
610+
611+
<a id="ionicgeneralauthoptions.alwayssendclientsecretonlogin"></a>
612+
613+
### `<Optional>` alwaysSendClientSecretOnLogin
614+
615+
**● alwaysSendClientSecretOnLogin**: *`undefined` \| `false` \| `true`*
616+
617+
should the 'client\_secret' value always be passed in for login calls, regardless of implict(web) or not defaults to: true
618+
619+
___
620+
<a id="ionicgeneralauthoptions.androidtoolbarcolor"></a>
621+
622+
### `<Optional>` androidToolbarColor
623+
624+
**● androidToolbarColor**: *`undefined` \| `string`*
625+
626+
setting to allow the toolbar color of the android webview control to be set. Takes a string that can be parsed as a color by `android.graphics.Color.parseColor`
627+
628+
___
629+
<a id="ionicgeneralauthoptions.audience"></a>
630+
631+
### `<Optional>` audience
632+
633+
**● audience**: *`undefined` \| `string`*
634+
635+
Provided audience (aud) value
636+
637+
___
638+
<a id="ionicgeneralauthoptions.authconfig"></a>
639+
640+
### `<Optional>` authConfig
641+
642+
**● authConfig**: *"auth0" \| "azure" \| "cognito" \| "general"*
643+
644+
The type of the Auth Server, currently only the following are supported:
645+
646+
* Auth0
647+
* Azure Active Directory
648+
* Cognito (AWS)
649+
650+
___
651+
<a id="ionicgeneralauthoptions.clientid"></a>
652+
653+
### clientID
654+
655+
**● clientID**: *`string`*
656+
657+
Provided Application ID
658+
659+
___
660+
<a id="ionicgeneralauthoptions.clientsecret"></a>
661+
662+
### `<Optional>` clientSecret
663+
664+
**● clientSecret**: *`undefined` \| `string`*
665+
666+
The client secret, optional only required for Cognito/Web
667+
668+
___
669+
<a id="ionicgeneralauthoptions.discoveryurl"></a>
670+
671+
### `<Optional>` discoveryUrl
672+
673+
**● discoveryUrl**: *`undefined` \| `string`*
674+
675+
Location of the Auth Server's discovery endpoint, can be null for Azure
676+
677+
___
678+
<a id="ionicgeneralauthoptions.implicitlogin"></a>
679+
680+
### `<Optional>` implicitLogin
681+
682+
**● implicitLogin**: *"CURRENT" \| "POPUP"*
683+
684+
for implicit login (aka web) should the auth window be opened in a new popup window/tab or the current windwow/tab defaults to: `POPUP` for `CURRENT` to work the app will need to call `IIonicAuth::handleCallback` when the auth service navigates to the url set in `redirect_url`
685+
686+
___
687+
<a id="ionicgeneralauthoptions.ioswebview"></a>
688+
689+
### `<Optional>` iosWebView
690+
691+
**● iosWebView**: *"private" \| "shared"*
692+
693+
setting the option to `shared` allows for sharing a session between Safari and other applications for a true SSO experience between apps but on iOS 11 and higher it will prompt the user for permission to share the website data with the application. Using `private` avoids the prompt but the session will only be shared with Safari on iOS 10 or lower.
694+
695+
___
696+
<a id="ionicgeneralauthoptions.loglevel"></a>
697+
698+
### `<Optional>` logLevel
699+
700+
**● logLevel**: *"DEBUG" \| "ERROR" \| "NONE"*
701+
702+
The log level for the module
703+
704+
___
705+
<a id="ionicgeneralauthoptions.logouturl"></a>
706+
707+
### logoutUrl
708+
709+
**● logoutUrl**: *`string`*
710+
711+
Location that the hosting app expects logout callbacks to navigate to.
712+
713+
___
714+
<a id="ionicgeneralauthoptions.platform"></a>
715+
716+
### `<Optional>` platform
717+
718+
**● platform**: *"web" \| "cordova" \| "capacitor"*
719+
720+
Are we hosted in cordova, web, capacitor
721+
722+
___
723+
<a id="ionicgeneralauthoptions.redirecturi"></a>
724+
725+
### `<Optional>` redirectUri
726+
727+
**● redirectUri**: *`undefined` \| `string`*
728+
729+
Location that the hosting app expects callbacks to navigate to.
730+
731+
___
732+
<a id="ionicgeneralauthoptions.scope"></a>
733+
734+
### `<Optional>` scope
735+
736+
**● scope**: *`undefined` \| `string`*
737+
738+
User details requested from the Authentication provider, each provider may support standard {e.g. openid, profile, email, etc.}, or custom scopes.
739+
740+
___
741+
<a id="ionicgeneralauthoptions.tokenstorageprovider"></a>
742+
743+
### `<Optional>` tokenStorageProvider
744+
745+
**● tokenStorageProvider**: *"localStorage" \| [TokenStorageProvider](#tokenstorageprovider) \| [IVUserInterface](#ivuserinterface)*
746+
747+
The type of storage to use for the tokens
748+
749+
___
750+
<a id="ionicgeneralauthoptions.webauthflow"></a>
751+
752+
### `<Optional>` webAuthFlow
753+
754+
**● webAuthFlow**: *"implicit" \| "PKCE"*
755+
756+
Authentication flow to use on web defaults to: `implicit` `PKCE` is not supported by Azure, if `authConfig` is set to `azure` the plugin will use `implicit` despite `webAuthFlow` value
757+
600758
___
601759

602760
___
@@ -767,6 +925,27 @@ ___
767925

768926

769927

928+
### [1.5.0] (2020-02-17)
929+
930+
931+
### Features
932+
933+
* **web:** add PKCE auth flow option
934+
935+
### [1.4.0] (2020-02-13)
936+
937+
938+
### Features
939+
940+
* reject if user closed the auth browser
941+
942+
943+
### Bug Fixes
944+
945+
* **ios, android, web:** SE-132: allow client_secret to be passed into authorization calls.
946+
* propagate network errors on login
947+
* update to general to send client secret in payload of token call
948+
770949
### [1.3.5] (2019-12-17)
771950

772951

0 commit comments

Comments
 (0)