Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Muska-Ami committed Dec 24, 2024
1 parent c03a7bd commit 190a3f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
5 changes: 1 addition & 4 deletions nyalcf_cli/lib/commands/authorize.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ class Authorize implements Command {
'?app_id=1'
'&scopes=User,Proxy,Sign'
'&redirect_url='
'https://dashboard.locyanfrp.cn/callback/auth/oauth/localhost'
'?port=21131'
'&ssl=false'
'&path=/oauth/callback',
'https%3A%2F%2Fdashboard.locyanfrp.cn%2Fcallback%2Fauth%2Foauth%2Flocalhost%3Fport%3D21131%26ssl%3Dfalse%26path%3D%2Foauth%2Fcallback',
);
Logger.write('Waiting callback...');
Future.doWhile(() async {
Expand Down
13 changes: 4 additions & 9 deletions nyalcf_gui/nyalcf_ui/lib/views/auth/authorize.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
// Dart imports:
import 'dart:convert';

// Flutter imports:
import 'package:flutter/material.dart';

// Package imports:
import 'package:crypto/crypto.dart';
// Flutter imports:
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:nyalcf_core/models/user_info_model.dart';
import 'package:nyalcf_core/network/client/api/auth/oauth/access_token.dart';
Expand All @@ -15,12 +14,11 @@ import 'package:nyalcf_core/network/client/api_client.dart';
import 'package:nyalcf_core/network/server/oauth.dart';
import 'package:nyalcf_core_extend/storages/prefs/token_info_prefs.dart';
import 'package:nyalcf_core_extend/storages/prefs/user_info_prefs.dart';
import 'package:url_launcher/url_launcher.dart';

// Project imports:
import 'package:nyalcf_ui/models/appbar_actions.dart';
import 'package:nyalcf_ui/widgets/nya_loading_circle.dart';
import 'package:nyalcf_ui/widgets/nya_scaffold.dart';
import 'package:url_launcher/url_launcher.dart';

class AuthorizeUI extends StatefulWidget {
const AuthorizeUI({super.key});
Expand Down Expand Up @@ -112,10 +110,7 @@ class _AuthorizeState extends State<AuthorizeUI> {
'?app_id=1'
'&scopes=User,Proxy,Sign'
'&redirect_url='
'https://dashboard.locyanfrp.cn/callback/auth/oauth/localhost'
'?port=21131'
'&ssl=false'
'&path=/oauth/callback';
'https%3A%2F%2Fdashboard.locyanfrp.cn%2Fcallback%2Fauth%2Foauth%2Flocalhost%3Fport%3D21131%26ssl%3Dfalse%26path%3D%2Foauth%2Fcallback';
launchUrl(Uri.parse(url));
OAuth.initRoute(
response: OAuthResponseBody(success: '授权成功', error: '授权失败'),
Expand Down

0 comments on commit 190a3f2

Please sign in to comment.