Skip to content

Marked verifyScope function as optional in model types. #209

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

Merged

Conversation

shrihari-prakash
Copy link
Contributor

Summary

When you do not implement verifyScope method in the model, TypeScript currently throws an error even though you do not need to implement this method in all cases. There are a lot of instances where verifyScope method is optional. There is already some error mechanisms to throw errors in cases where verifyScope is required and is not implemented. So making this implementation optional in models.

Linked issue(s)

#202

Involved parts of the project

Typings

Added tests?

NA

OAuth2 standard

NA

Reproduction

TypeScript will not throw errors anymore if you do not implement verifyScope when using your own authenticate handler.

@jankapunkt jankapunkt changed the base branch from master to development August 4, 2023 07:12
@shrihari-prakash
Copy link
Contributor Author

@jankapunkt , I will let you merge once the pipelines are done.

@jankapunkt jankapunkt linked an issue Aug 4, 2023 that may be closed by this pull request
@jankapunkt jankapunkt merged commit e29410b into node-oauth:development Aug 4, 2023
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.

Is implementation of verifyScope required?
2 participants