Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-1630

Users asked to login more than once when the token is expired

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.1.1
    • 3.1.0
    • Accounts
    • Hide
      1. Configure a Moodle site to login via system browser (NOT embedded).
      2. Configure the app to use a fixed URL with that Moodle site.
      3. Login in the app.
      4. Go to Moodle DB and delete the user's token.
      5. In the app, do a PTR in My Courses. Check that the modal telling you to go to browser is shown.
      6. Go to browser and enter the credentials again if needed. Check that the app is opened again and the reconnect modal isn't shown again.
      Show
      Configure a Moodle site to login via system browser (NOT embedded). Configure the app to use a fixed URL with that Moodle site. Login in the app. Go to Moodle DB and delete the user's token. In the app, do a PTR in My Courses. Check that the modal telling you to go to browser is shown. Go to browser and enter the credentials again if needed. Check that the app is opened again and the reconnect modal isn't shown again.
    • MOODLE_31_STABLE
    • MOODLE_31_STABLE
    • Moodle Mobile 3.1.1

      The dialog with the message "Your authentication token is invalid or has expired, you have to reconnect to the site. You need to log in to the site in a browser window." is shown more than once when a token is expired. This happens when a fixed URL is set in config.json, and login is done via a browser window. This is similar to MOBILE-1425.

      Steps to reproduce:

      1. Set the type of login to "Via a browser window" in the local plugin settings
      2. Build a custom app with a fixed URL in www/config.json (parameter "siteurl").
      3. Install and launch the app in a device.
      4. Log in with any user.
      5. Delete the token created for this user from the mdl_external_tokens table.
      6. Pull to refresh the list of courses.
      7. The dialog with text "Your authentication token is invalid or has expired [...]" is shown. Click "OK" and enter the username / password in the browser.

      Result:
      The same dialog is shown again. If you click "Cancel" you can continue to use the app as normal, already logged in. If you click "OK" the browser window is launched again.

      This happens on Android, I have not tested other platforms.

            dpalou Dani Palou
            albert.gasset Albert Gasset
            Pau Ferrer Pau Ferrer
            Juan Leyva Juan Leyva
            Juan Leyva Juan Leyva
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 3 hours Original Estimate - 3 hours
                3h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 week, 1 day, 2 hours, 30 minutes
                1w 1d 2h 30m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.