Auth0 oauth2 stack height

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
bhall2001
Posts: 107
Joined: Thu Oct 30, 2014 3:54 pm
Location: Manchester, NH

Auth0 oauth2 stack height

Post by bhall2001 » Wed Aug 18, 2021 12:26 pm

I'm adding authentication using Auth0 using oauth2 to a desktop app built with Livecode. I didn't have any issues getting Auth0 configured and sending back valid jwt tokens. Only issue I found was that Auth0's ui was too tall for the default Livecode oauth2 stack. This resulted in a scrollbar being displayed and the user having to scroll down in some cases to access needed items.

Thanks to a tip from Bernd on the Livecode email list, I've been able to modify the oauth2 stack for Auth0 so it looks great! Here's what you need to do.

(LC 9.6.3, macOS 11.5 but honestly should work on any platform)
note: I presume you already have configured/tested using oauth2 with Auth0 in a desktop app

- in script editor, enable View->Show IDE Stacks in Lists
- Tools->Project Browser
- find com.livecode.library.oauth2 and click the number on the right of the row to open the stack script
- modify the following lines to increase the height of the stack and position the cancel button
- line 174: set the height of stack tUniqueRef to 760
- line 175: put 0,0,640,720 into tBrowserRect
- line 180: set the rect of it to 8,728,78,751

note: this changes Livecode's oauth2 library stack. This change affects any stack using the oauth2 command in Livecode.
note: this change we are making is not permanent. When a new version of Livecode is installed, these changes will be lost.
note: any standalone built after this modification will display a taller oauth2 window.
caution: be sure you understand security implications of having a client secret in your app when using Auth0 for jwt's.

Bob Hall
Manchester, NH

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”