Skip to content

Commit

Permalink
follow redirection
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Lu-none committed Apr 7, 2024
1 parent 39c38c7 commit 890f249
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/src/connector/score_connector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ class ScoreConnector {
String jumpUrl = tagNode.getElementsByTagName("form")[0].attributes["action"];
parameter = ConnectorParameter(jumpUrl);
parameter.data = data;

final oauthResult = await Connector.getDataByPostResponse(parameter);
final oauthTagNode = parse(oauthResult.data);
final jumpUrl2 = oauthTagNode.getElementsByTagName("a")[0].attributes['href'];

parameter = ConnectorParameter(jumpUrl2);
await Connector.getDataByPostResponse(parameter);
return ScoreConnectorStatus.loginSuccess;
} catch (e, stack) {
Expand Down

0 comments on commit 890f249

Please sign in to comment.