Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OAuth consent screen showing wrong scopes #110

Open
matinzd opened this issue Jan 31, 2022 · 0 comments
Open

OAuth consent screen showing wrong scopes #110

matinzd opened this issue Jan 31, 2022 · 0 comments

Comments

@matinzd
Copy link

matinzd commented Jan 31, 2022

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.

@matinzd matinzd changed the title Consent screen showing wrong scopes OAuth Consent screen showing wrong scopes Jan 31, 2022
@matinzd matinzd changed the title OAuth Consent screen showing wrong scopes OAuth consent screen showing wrong scopes Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant