Difference between revisions of "Identity Service"
Line 9: | Line 9: | ||
You can register your Applications at https://www.lfs.net/account/api | You can register your Applications at https://www.lfs.net/account/api | ||
− | An Application is always required for Oauth2 authentications, one for each flow you will be using. | + | An Application is always required for Oauth2 authentications, one for each [https://en.lfsmanual.net/wiki/Identity_Service#Authentication_Flows flow] you will be using. |
An Application must have a name and one redirect uri pointing to a callback endpoint on your website where authenticated users will return to after authentication. A redirect uri is also required even if you only use the LFS API for your own (back end) purposes. In that case you can enter a fictional redirect uri. | An Application must have a name and one redirect uri pointing to a callback endpoint on your website where authenticated users will return to after authentication. A redirect uri is also required even if you only use the LFS API for your own (back end) purposes. In that case you can enter a fictional redirect uri. |
Revision as of 14:49, 22 February 2022
Introduction
The LFS Identity Service -based on Oauth2- allows you to integrate LFS user authentication into your own website. Identity tokens are also required for using the LFS API. Both purposes are often used together; your website can authenticate an LFS user visiting your own website to perform actions on your website, on behalf of the LFS user. These actions are performed using the LFS API. Though you can also use the LFS API alone via (back end) scripts, to fetch and / or update information related to your own LFS account.
The Application
In order to use the LFS Identity Service, you must always register a so called Application. An Application is a record of your website that will perform LFS User authentications. Though registration of an Application is also required if you only want to use the LFS API in your (back end) scripts.
You must have at least one Application, but it is possible to register multiple Applications used for different purposes.
You can register your Applications at https://www.lfs.net/account/api
An Application is always required for Oauth2 authentications, one for each flow you will be using.
An Application must have a name and one redirect uri pointing to a callback endpoint on your website where authenticated users will return to after authentication. A redirect uri is also required even if you only use the LFS API for your own (back end) purposes. In that case you can enter a fictional redirect uri.
After Application registration you will receive a Client ID and a Client Secret that you must write down, in order to perform Identity Authentications later on.
Authentication Flows
2 main flows: - for single page applications - for back end scripts
Single Page Applications
explanation here
Back End Scripting
explanation here
Usage
examples
Single Page Applications
example here
Back End Scripting
example here