Custom Action for decoding JWT and saving info in Shared Preferences

Hi all. I am using a third party SSO service for my mobile. This is so we can login in to multiple services at once while in the app ( such as gmail and other services the school offers).

I was able to successfully set up a custom auth process using their API.

However, in order to start a single sign on session so that i can automatically be logged into the other services within the app i need to save my information in shared preferences.

I was able to add custom code in directly to the related files and successfully run the app locally. However, i'm struggling to add this same code in as custom actions within the flutterflow app.

The custom code I added locally:

note: miniorange is the sso service:

This was to decode my JWT
I imported the "dart:convert' here

Here i'm using the function above to to decode the JWT and saving the decoded info in shared preferences

then in the home page I retrieve this info as the page loads:

Here is how my auth is set up -

Im struggling to set this up as custom actions that occur after authentication is successful. Is it possible to do this on flutterflow?

Let me know if theres any other useful info I can provide!