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 support #850

Merged
merged 4 commits into from
Jul 17, 2023
Merged

Oauth support #850

merged 4 commits into from
Jul 17, 2023

Conversation

dangond-ptc
Copy link
Contributor

No description provided.

const querystring = require('querystring');

const oauthRefreshRequestHandler = (req, res) => {
const refreshUrl = req.params[0]; // TODO: get this from the tool somehow to prevent leaking secret to any supplied url
Copy link
Contributor

Choose a reason for hiding this comment

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

If this is expected to always be an onshape url there could be an allowList of known urls to which we're okay with sending oauth requests. Any new developer of an oauth-enabled tool would then locally modify this allowList and eventually get us to ad the new domain to all edge servers

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 was thinking of having the allowList be part of the secrets file for the add-on, since this is designed to be used with anything that supports OAuth, not just Onshape.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thumbs up emoji

Copy link
Member

@benptc benptc left a comment

Choose a reason for hiding this comment

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

LGTM

@hobinjk-ptc hobinjk-ptc merged commit f2b73c8 into master Jul 17, 2023
4 checks passed
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

Successfully merging this pull request may close these issues.

3 participants