basic oauth finally but also more dependencies
This commit is contained in:
parent
f6ea45d0e2
commit
bb8680e3f6
2 changed files with 38 additions and 9 deletions
|
@ -124,18 +124,16 @@ class _AuthPageState extends State<AuthPage> {
|
|||
},
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
label: Text("back-button".i18n())),
|
||||
FutureBuilder<http.Response>(
|
||||
future: oauth.doOauthFlow(),
|
||||
FutureBuilder<int>(
|
||||
future: oauth.handleFullOauth(),
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.hasError) {
|
||||
return Text("login-failed-snackbar-text".i18n());
|
||||
} else if (snapshot.hasData) {
|
||||
if (snapshot.data?.statusCode != null) {
|
||||
if (snapshot.data?.statusCode != 200) {
|
||||
if (snapshot.data != null) {
|
||||
if (snapshot.data != 200) {
|
||||
return Row(
|
||||
children: [
|
||||
Text("error ${snapshot.data!.statusCode}")
|
||||
],
|
||||
children: [Text("error ${snapshot.data}")],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue