@@ -72,7 +72,7 @@ abstract class Auth {
7272
7373 // Get the code from Strava server
7474 Future <void > getStravaCode (
75- String clientID, String redirectUrl , String scope ) async {
75+ String clientID, String scope , String prompt ) async {
7676 globals.displayInfo ('Entering getStravaCode' );
7777 var code = "" ;
7878 var params = '?' +
@@ -83,7 +83,7 @@ abstract class Auth {
8383 '&response_type=' +
8484 'code' +
8585 '&approval_prompt=' +
86- 'auto' +
86+ prompt +
8787 '&scope=' +
8888 scope;
8989
@@ -124,7 +124,7 @@ abstract class Auth {
124124 /// Do/show the Strava login if the scope has been changed since last storage of the token
125125 /// return true if no problem in authentication has been found
126126 Future <bool > OAuth (
127- String clientID, String redirectUrl , String scope , String secret ) async {
127+ String clientID, String scope , String secret , String promt ) async {
128128 print ('Welcome to Oauth' );
129129 bool isAuthOk = false ;
130130 bool isExpired = true ;
@@ -146,7 +146,7 @@ abstract class Auth {
146146 if ((tokenStored.scope != scope) || (_token == "null" ) || isExpired) {
147147 // Ask for a new authorization
148148 globals.displayInfo ('Doing a new authorization' );
149- isAuthOk = await newAuthorization (clientID, redirectUrl, secret, scope);
149+ isAuthOk = await newAuthorization (clientID, secret, scope, prompt );
150150 } else {
151151 isAuthOk = true ;
152152 }
@@ -156,11 +156,11 @@ abstract class Auth {
156156
157157
158158Future <bool > newAuthorization (
159- String clientID, String redirectUrl , String secret , String scope ) async {
159+ String clientID, String secret , String scope , String prompt ) async {
160160
161161 bool returnValue = false ;
162162
163- await getStravaCode (clientID, redirectUrl, scope );
163+ await getStravaCode (clientID, scope, prompt );
164164
165165 var stravaCode = await onCodeReceived.stream.first;
166166
0 commit comments