Explaining how logout flows works
There are two different types of logout functionality available in the platform. Depending on your client application type and integration with Schibsted account, you may need to use one or several approaches. Below is an explanation of each logout type.
Logging out of Schibsted account via the JavaScript SDK
Logging out via the JavaScript SDK deletes the current session for the logged in user based on the session cookie sent in the logout request. After the logout is performed on Schibsted account the SDK will trigger a number of events telling your application that the user has been logged out.
It is then up to your application to perform session cleaning and logout procedures needed to actively log out the user from your application.
Logging out of Schibsted account via the redirect flow
Logging out via the redirect flow, by redirecting the user to /logout
in Schibsted account, will delete the current session for the logged in user based on the session cookie sent in the logout request.
You must provide the client_id as GET parameter, to make sure correct context is used.
You may provide redirect_uri as GET parameter and Schibsted account will redirect the user to that url after performing the logout procedure. This parameter must be previously defined and stored as a valid redirect uri for your client application. It must also be url encoded.
It is then up to your application to perform session cleaning and logout procedures needed to actively log out the user from your application.
Use cases
If your application uses the JavaScript SDK it should use the logout functionality that SDK. If you're manually performing the redirect login flow (which should be avoided), use the redirect logout flow in order to actively logout the current user session.
Table of Contents
- Logging out of Schibsted account via the JavaScript SDK
- Logging out of Schibsted account via the redirect flow
- Use cases
See also
Help us improve
Did you spot an error? Or maybe you just have a suggestion for how we can improve? Leave a comment, or better yet, send us a pull request on GitHub to fix it (in-browser editing, only takes a moment).
Comments/feedback
Do you have questions, or just want to contribute some newly gained insight? Want to share an example? Please leave a comment. Our team reads and responds to every question. Additionally, your experience can help others using Schibsted account, and it can help us continuously improve our documentation.