microsoft / microsoft/azure-devops-auth-samples

Getting InvalidScope error after completing the Authentication

Open
#86 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
277
Forks
307
Avg merge
3d 18h
Merged PRs (30d)
2

Description

Hi Team,

I have cloned the below Solution and tried the OAuthWebSample solution by replacing with my Values which i have registered.

Starting when i have started the solution with my values i have Authorized the Application and i have not got any authorization Code and state for me to create a token.

In the Code the Callback method is accepting Code and state as parameters and i tried many times after me authorizing the app and i am getting two different error.

  1. on completion of authorization its redirecting to the This site cant provide a secure connection and displaying as below in the address bar https://localhost:43742/OAuth/Callback?error=InvalidScope

2)Can anyone please clarify me on the Callback URL what should be mentioned because in the solution screen it was mentioned https://yoursite.azurewebsite.net/OAuth/CallBack. Should we need to maintain the callback URL in the same manner where we need to include AzureWebSite.Net in my application URL?

  1. For the first time users we will be allowing them to authorize the APP. after that how we need to achieve the token creation in the callback functionality?

I am new to this OAuth Authentication can anyone guide me in the right direction of how i can upgrade my application from removing the PAT token authentication to OAUTH Bearer token authentication. Hoping for a faster reply.

Thanks,
Deepak

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the OAuthWebSample and its Callback method, then compare the registered application values with the redirect URL being used. Reproduce the authorization flow and inspect the InvalidScope callback result. Done means the sample explains the required callback URL, authorization-code handling, and transition from PAT to OAuth bearer tokens.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, javascript
Domain
authentication, cloud
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.