Skip to content

Commit

Permalink
🔥 Removed client secret
Browse files Browse the repository at this point in the history
  • Loading branch information
LNA-DEV committed Oct 31, 2024
1 parent d4b83fe commit 212b3e0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions lib/auth/login_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class LoginManager {
// }
}

Future<String?> login(String clientId, String clientSecret, BuildContext context) async {
Future<String?> login(String clientId, BuildContext context) async {
if (Globals.isTv) {
DeviceCode deviceCode = DeviceCode();
var token = await deviceCode.authenticateUser(Globals.ClientId, "offline_access", Globals.DeviceCodeUrl, context);
Expand All @@ -63,7 +63,6 @@ class LoginManager {

AccessTokenResponse tknResponse = await client.getTokenWithAuthCodeFlow(
clientId: clientId,
clientSecret: Uri.encodeQueryComponent(clientSecret),
scopes: ["offline_access"],
webAuthClient: baseWebAuth,
state: state,
Expand Down
1 change: 0 additions & 1 deletion lib/globals.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ class Globals {
static String BaseUrl = "http://localhost:8080";

static String ClientId = "";
static String ClientSecret = "";
static String AuthorizeUrl = "";
static String TokenUrl = "";
static String DeviceCodeUrl = "";
Expand Down
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,6 @@ class HomePage extends StatelessWidget {
Future authenticate(BuildContext context) async {
LoginManager loginManager = LoginManager();
var token =
await loginManager.login(Globals.ClientId, Globals.ClientSecret, context);
await loginManager.login(Globals.ClientId, context);
}
}

0 comments on commit 212b3e0

Please sign in to comment.