Skip to content

Scope checking is too strict and causes error when the number of scopes requested is reduced #48

Closed
XeroAPI/xero-python-oauth2-app
#47
@wobinb

Description

@wobinb

Scopes in Xero's OAuth 2.0 implementation are additive.

If the first time a connection is authorised scopes A, B and C are requested, they will always be included.

On a second authorisation for the same user, if only scopes A and B are requested, C will also be returned.

The SDK appears to then do a validation check to verify the scopes returned match the ones requested, and the process fails.

To recreate:

  1. Set the scopes to include payroll.employees and complete the authorisation process for one user.
  2. Remove the payroll.employees and repeat the authorisation process for the same user.
  3. Observe the process fails with a Scope has changed from... error

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions