Use random port for http server port
Android does not allow binding static ports.
This commit is contained in:
parent
9607d2ca0c
commit
10a4909d5d
@ -548,7 +548,10 @@ class AuthentikUserSettingsChangeDialogState extends ChangeNotifier {
|
|||||||
final identifier = 'UwSMm8gTwBTUURSaxp5uPpuwX1OkGO4FRHeO9v3i';
|
final identifier = 'UwSMm8gTwBTUURSaxp5uPpuwX1OkGO4FRHeO9v3i';
|
||||||
final secret = null;
|
final secret = null;
|
||||||
|
|
||||||
final redirectUrl = Uri.parse('http://localhost:30165/');
|
server = await HttpServer.bind("127.0.0.1", 0);
|
||||||
|
|
||||||
|
final port = server!.port;
|
||||||
|
final redirectUrl = Uri.parse('http://localhost:$port/');
|
||||||
|
|
||||||
var grant = oauth2.AuthorizationCodeGrant(
|
var grant = oauth2.AuthorizationCodeGrant(
|
||||||
identifier,
|
identifier,
|
||||||
@ -562,8 +565,6 @@ class AuthentikUserSettingsChangeDialogState extends ChangeNotifier {
|
|||||||
scopes: ["profile", "email", "goauthentik.io/api", "openid"],
|
scopes: ["profile", "email", "goauthentik.io/api", "openid"],
|
||||||
);
|
);
|
||||||
|
|
||||||
server = await HttpServer.bind("127.0.0.1", 30165);
|
|
||||||
|
|
||||||
if (!await launchUrl(
|
if (!await launchUrl(
|
||||||
authorizationUrl,
|
authorizationUrl,
|
||||||
mode: LaunchMode.externalApplication,
|
mode: LaunchMode.externalApplication,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user