How to use authManager object in a custom action?

Custom Code

I'm trying to make a post request and refresh auth token in a custom action with information from this video https://www.youtube.com/watch?v=d_MVR2Ocbk8 but it doesn't work.

I added

import '../../auth/custom_auth/auth_util.dart';

to a custom action and currentAuthRefreshToken is available, but authManager object isn't.

  authManager.updateAuthUserData(
      authenticationToken: jsonResponse['access_token'],
      refreshToken: jsonResponse['refresh_token'],
      tokenExpiration: DateTime.fromMillisecondsSinceEpoch(
          jsonResponse['expires_at'] * 1000));


I get the error: Undefined name 'authManager'. Try correcting the name to one that is defined, or defining the name.

How can I update auth data from a custom action?

What have you tried so far?

Every step in the video

Did you check FlutterFlow's Documentation for this topic?
Yes
3
6 replies