MDL-71119 core_badges: Initialise scopes param in backpack-connect.php
commit946120eeeeeff8ff28d83d0ad0dd2b3e64c9d23d
authorSara Arjona <sara@moodle.com>
Tue, 16 Mar 2021 11:32:20 +0000 (16 12:32 +0100)
committerSara Arjona <sara@moodle.com>
Wed, 14 Apr 2021 09:04:28 +0000 (14 11:04 +0200)
tree63ce949dd9507113a06236fbbcb5c144b37b329c
parent30e6bf75dd23648a6f4fd05d326698f46e8316d4
MDL-71119 core_badges: Initialise scopes param in backpack-connect.php

The scopes parameter should be passed when creating the OAuth2 badges
client. As it is an optional parameter, when it's empty, it will
be initilised with the supported scopes for the backpack issuer.

It will happen, for instance, when a call is done to oauth2callback.php
because, as defined in RFC6749, OAuth2 authorization response only
supports code and state.
badges/backpack-connect.php