Yes, you are on the right path - we need an authorization code instead of the access token we currently receive. So you'll need to look at where login in happens: `treeherder/ui/shared/auth/Login.jsx` And what happens in the callback: `treeherder/ui/login-callback/LoginCallback.jsx` and determine what needs to change in the logic: `treeherder/ui/helpers/auth.js` and what we pass to our server. The taskcluster login logic (which happens after a user logins in and we retrieve the Mozilla auth0 credentials) is using the authorization flow so you might find it helpful to look at how that's implemented: `treeherder/ui/helpers/taskcluster.js` You can reuse the `generateNonce` helper in that file for the `state` property. Anything that can be reused in that file should be. Once you figure out what changes you need to make, you can open a WIP pr if you'd like feedback on the changes. :)
Bug 1643117 Comment 3 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Yes, you are on the right path - we need an authorization code instead of the access token we currently receive. So you'll need to look at where login happens: `treeherder/ui/shared/auth/Login.jsx` And what happens in the callback: `treeherder/ui/login-callback/LoginCallback.jsx` and determine what needs to change in the logic: `treeherder/ui/helpers/auth.js` and what we pass to our server. The taskcluster login logic (which happens after a user logins in and we retrieve the Mozilla auth0 credentials) is using the authorization flow so you might find it helpful to look at how that's implemented: `treeherder/ui/helpers/taskcluster.js` You can reuse the `generateNonce` helper in that file for the `state` property. Anything that can be reused in that file should be. Once you figure out what changes you need to make, you can open a WIP pr if you'd like feedback on the changes. :)
Yes, you are on the right path - we need an authorization code instead of the access token we currently receive. So you'll need to look at where login happens: `treeherder/ui/shared/auth/Login.jsx` And what happens in the callback: `treeherder/ui/login-callback/LoginCallback.jsx` and determine what needs to change in the logic: `treeherder/ui/helpers/auth.js` and what we pass to our server. The taskcluster login logic (which is completely separate and happens after a user logins in and we retrieve the Mozilla auth0 credentials) is using the authorization flow so you might find it helpful to look at how that's implemented: `treeherder/ui/helpers/taskcluster.js` You can reuse the `generateNonce` helper in that file for the `state` property. Anything that can be reused in that file should be. Once you figure out what changes you need to make, you can open a WIP pr if you'd like feedback on the changes. :)
Yes, you are on the right path - we need an authorization code instead of the access token we currently receive. So you'll need to look at where login happens: `treeherder/ui/shared/auth/Login.jsx` And what happens in the callback: `treeherder/ui/login-callback/LoginCallback.jsx` and determine what needs to change in the logic: `treeherder/ui/helpers/auth.js` and what we pass to our server. The taskcluster login logic (which is completely separate and happens after a user logins in and we retrieve the Mozilla auth0 credentials) is using the authorization flow so you might find it helpful to look at how that's implemented: `treeherder/ui/helpers/taskcluster.js` You can reuse the `generateNonce` helper in that file for the `state` property. Anything that can be reused in that file should be. Once you figure out what changes you need to make, you can open a WIP pr if you'd like feedback on the changes or additional guidance. :)