Skip to content

Commit

Permalink
Merge pull request #24 from RNVD/thk_RNVD
Browse files Browse the repository at this point in the history
fix auth code
  • Loading branch information
or-else authored Jul 26, 2024
2 parents 96ffc06 + 200262f commit de95d7a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/src/models/auth-token.dart
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
class AuthToken {
/// Authentication token
final String token;
final String url_encoded_token;
final String? url_encoded_token;

/// Expire date of authentication token
final DateTime expires;

AuthToken(this.token, this.url_encoded_token, this.expires);
AuthToken(this.token, this.expires, {this.url_encoded_token} );
}

class OnLoginData {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/services/auth.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class AuthService {
_authenticated = (ctrl.code ?? 0) >= 200 && (ctrl.code ?? 0) < 300;

if (params['token'] != null && params['expires'] != null) {
_authToken = AuthToken(params['token'], Uri.encodeComponent(params['token']), DateTime.parse(params['expires']));
_authToken = AuthToken(params['token'], DateTime.parse(params['expires']), url_encoded_token: Uri.encodeComponent(params['token']));

} else {
_authToken = null;
Expand Down

0 comments on commit de95d7a

Please sign in to comment.