Skip to content

OAuth consent screen showing wrong scopes #110

Description

@matinzd

What is the problem?

I am trying to request these permissions:

const permissions: Permission[] = [
  {
    kind: Fitness.PermissionKinds.Steps,
    access: Fitness.PermissionAccesses.Read,
  },
  {
    kind: Fitness.PermissionKinds.Steps,
    access: Fitness.PermissionAccesses.Write,
  },
];

In this case, I need to see two permissions being granted on OAuth consent screen but if I include write permission, it always shows the following screenshot (Add to physical activity, so it means write not read):

Screenshot 2022-01-31 at 08 20 45

At this point, I tried to debug the code. As far as I debugged the code your code was fine and it was trying to build permissions according to the passed parameters through the react bridge. I found that FitnessOptions.builder.addDataType will always respect write permission for steps when I try to add also read permission. When you call getImpliedScopes() you can see that it only shows write scope as you can see in the attached screenshot:

Screenshot 2022-01-31 at 08 24 20

I would really appreciate it if you can fix the problem or help me with what's going wrong. I couldn't make it work to set both read and write scope even manually. I can only set read scope when I delete write access.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions