New in 1.41.0 (BETA)

logout(returnTo?)

Causes the user to be logged out of IAM.

Calling Scrivito.logout redirects the browser to the IAM logout page. From there, the browser is redirected to the IAM log-in page.

If you’ve set up your own IdP, you can configure a URL for logging out. Otherwise, a generic logout page is displayed.

Params

  • [New in 1.42.0] returnTo (optional) (String) – A URL to which the user is redirected after logging out. Note, that only trusted origins specified in the Scrivito Dashboard will be accepted.

Remarks

Once logged in through a third-party IdP, its configured logout URL takes precedence if provided.

[New in 1.43.0]If the Scrivito UI is present, calling Scrivito.logout has no effect.

Returns

Void