Atozed Forums
New OAuth demo - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: New OAuth demo (/thread-3241.html)



New OAuth demo - Alexandre Machado - 05-18-2023

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/master/15/Delphi/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/


RE: New OAuth demo - swiatex - 05-20-2023

Cool! Smile