Skip to content

AppAuthHelper

Dan M edited this page Mar 29, 2022 · 2 revisions

AppAuthHelper contains methods related to logging in and out using flutter_appauth.

Tips and Tricks

You can set all of the parameters such as redirectUrl in static methods on the startup of your application, to save you passing them in later in your app:

void main() {

  runApp(const MyApp());
}
...

class _MyAppState extends State<MyApp> {
  ...

  @override
  void initState() {
    super.initState();
    ...

    AppAuthHelper.setRealm("realm");
    AppAuthHelper.setClientId("clientId");
    AppAuthHelper.setRedirectUrl("redirectUrl");
    AppAuthHelper.setAuthServerUrl("authServerUrl");
    ...
  }

Clone this wiki locally