'How to set up Auth0 in Flutter Web

Im trying to set up auth0 on a flutter web aplication. I manged to get up to the point where it opens uth0 login, i can enter the login, but then nothing happens. This is the code (without proper domain id and callback uri). How do i get the login token back to my app?

import 'package:flutter_web_auth/flutter_web_auth.dart';
import 'package:http/http.dart' as http;

  const domain = 'DOMAIN';
  const clientId = 'ID';
  const callbackUrlScheme = 'CALLBACK_URI';


  final url = 'https://$domain/authorize?redirect_uri=$callbackUrlScheme&client_id=$clientId&response_type=code&prompt=login&state=STATE&scope=openid';
void authenticate() async {
  try {
    final result = await FlutterWebAuth.authenticate(
        url: url, callbackUrlScheme: callbackUrlScheme);
    print(result);
  } on PlatformException catch (e) {
    print(e);
  }
}```





Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source