Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New OAuth demo
#1
Hi guys,

Following version 15.3.6 release, we took some time to create a comprehensive demo showing some of the OAuth features:

https://github.com/Atozed/IntraWeb/tree/...lphi/OAuth

This demo shows:

1) How to obtain the access token from one of the supported APIs (Google, MS Azure, Facebook)
2) How to save this information to the databased and how to use it to validate subsequent visits from the same user
3) How to create a browser side token (linked to the access token) and use it as a cookie to identify returning users
4) How to refresh/revalidate the access token

You will find a bit of code and information in the UserSessionUnit.pas unit file.

Remember that the demo won't work straight away if you just download and run it, because each IntraWeb application needs to use it's own Google/Azure/Facebook credentials, meaning that the IW developer needs to create and register an application with one or more of the supported APIs and use that information when configuring your IW application. See the instructions on the main form of the application and also check the code in ServerController.

Hope you guys find it useful.  Big Grin

PS: This demo requires version 15.3.6 (or later): https://www.atozed.com/2023/05/intraweb-15-3-6/
Reply
#2
Cool! Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)