diff --git a/docs/site/angular-auth-oidc-client/docs/documentation/03-login-logout.md b/docs/site/angular-auth-oidc-client/docs/documentation/03-login-logout.md index df9805dda..60bf1b1e0 100644 --- a/docs/site/angular-auth-oidc-client/docs/documentation/03-login-logout.md +++ b/docs/site/angular-auth-oidc-client/docs/documentation/03-login-logout.md @@ -180,31 +180,34 @@ You can pass an `logoutAuthOptions` parameter if you want to control the behavio ```ts logout() { - const logoutAuthOptions = { + const logoutAuthOptions: LogoutAuthOptions = { customParams: { logout_hint: 'some-logout-hint', /* other params */ - }, - urlHandler: () => { - /* ... */ - }, + } }; + // Use an empty string for the configId if this is not a multiple client + // subscribe to the result if you expect the function to return. + // => .subscribe((result) => console.log(result)); this.oidcSecurityService.logoff('configId', logoutAuthOptions); } ``` If you prefer to send a POST logout request: -``` +```ts logout() { - // logoffMethod` - Which can be `GET` or `POST - const logoutAuthOptions: LogoutAuthOptions = { - logoffMethod: 'POST', - }; - - this.oidcSecurityService.logoff('', logoutAuthOptions) - .subscribe((result) => console.log(result)); + // logoffMethod` - Which can be `GET` or `POST + const logoutAuthOptions: LogoutAuthOptions = { + customParams: { + logout_hint: 'some-logout-hint', + }, + logoffMethod: 'POST', + }; + + this.oidcSecurityService.logoff('', logoutAuthOptions) + .subscribe((result) => console.log(result)); } ``` @@ -219,6 +222,21 @@ logoffAndRevokeTokens() { } ``` +or an example using the LogoutAuthOptions parameters: + +```ts +logoffAndRevokeTokens() { + const logoutAuthOptions: LogoutAuthOptions = { + customParams: { + logout_hint: 'some-logout-hint', + }, + }; + + this.oidcSecurityService.logoffAndRevokeTokens('', logoutAuthOptions) + .subscribe((result) => console.log(result)); +} +``` + The method also takes `configId` and `logoutAuthOptions` parameters if needed. ### `logoffLocal()`