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

feat: release AzureDevOps integration #9531

Merged
merged 3 commits into from
Mar 25, 2024
Merged

Conversation

Dschoordsch
Copy link
Contributor

@Dschoordsch Dschoordsch commented Mar 13, 2024

Fixes #9408

Don't hide it behind a feature flag anymore.

Testing scenarios

  • Authenticate with ADO

Final checklist

  • I checked the code review guidelines
  • I have added Metrics Representative as reviewer(s) if my PR invovles metrics/data/analytics related changes
  • I have performed a self-review of my code, the same way I'd do it for any other team member
  • I have tested all cases I listed in the testing scenarios and I haven't found any issues or regressions
  • Whenever I took a non-obvious choice I added a comment explaining why I did it this way
  • I added the label Skip Maintainer Review Indicating the PR only requires reviewer review and can be merged right after it's approved if the PR introduces only minor changes, does not contain any architectural changes or does not introduce any new patterns and I think one review is sufficient'
  • PR title is human readable and could be used in changelog

Don't hide it behind a feature flag anymore.
Modify the oauth flow slightly for a web app with a client secret. This
will increase the lifetime of the authorization token and thus improve
the user experience.
An additional scope `offline_access` is necessary so we still get a
refresh token.
@@ -40,8 +40,8 @@ class AzureDevOpsClientManager {
const providerState = Math.random().toString(36).substring(5)
const verifier = AzureDevOpsClientManager.generateVerifier()
const code = await AzureDevOpsClientManager.generateCodeChallenge(verifier)
const redirect = makeHref('/auth/ado')
const scope = '499b84ac-1321-427f-aa17-267ca6975798/.default'
const redirect = makeHref('/auth/ado2')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I switched our app to be a "web" app rather than "spa" so our access token gets a longer life-span. Because the redirects are not compatible, I just appended the 2 for now so it works straight after deploying.

const redirect = makeHref('/auth/ado')
const scope = '499b84ac-1321-427f-aa17-267ca6975798/.default'
const redirect = makeHref('/auth/ado2')
const scope = '499b84ac-1321-427f-aa17-267ca6975798/.default offline_access'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional scope to still get a refresh token.

@nickoferrall nickoferrall merged commit 87c84a2 into master Mar 25, 2024
6 checks passed
@nickoferrall nickoferrall deleted the feat/releaseAzureDevOps branch March 25, 2024 19:17
@github-actions github-actions bot mentioned this pull request Mar 27, 2024
24 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Turn on MS features for MS folks
2 participants