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

[DEV-2050] Implement Passport.js Strategy for MyMLH #1

Merged
merged 22 commits into from
Nov 15, 2024

Conversation

jonmarkgo
Copy link
Member

No description provided.

@jonmarkgo jonmarkgo changed the title Implement Passport.js Strategy for MyMLH [DEV-2050] Implement Passport.js Strategy for MyMLH Nov 13, 2024
@jonmarkgo
Copy link
Member Author

Tested this with the following example app and it works as expected: https://gist.github.com/jonmarkgo/90dd36ca822fdbd1a259ccbcbcd5ab6a

jonmarkgo and others added 22 commits November 15, 2024 18:47
- Add core strategy implementation following Facebook patterns
- Implement uid, info, and data methods from Ruby implementation
- Add comprehensive test suite
- Configure package.json with proper metadata

The implementation includes:
- OAuth2 strategy with MyMLH endpoints
- Support for expandable fields
- Profile normalization
- Comprehensive error handling
- Test coverage for core functionality
- Rename Strategy to MLHStrategy throughout the codebase
- Export MLHStrategy as both default and named export
- Force space separator for MLH scopes
- Add proper scope string normalization
- Update documentation with scope examples
- Added type: module to package.json
- Converted strategy.js to use class syntax and ES module exports
- Updated index.js to use ES module imports/exports
- Updated test file to use ES module imports
- Fixed scope handling and MLHStrategy export issues
- Add core strategy implementation following Facebook patterns
- Implement uid, info, and data methods from Ruby implementation
- Add comprehensive test suite
- Configure package.json with proper metadata

The implementation includes:
- OAuth2 strategy with MyMLH endpoints
- Support for expandable fields
- Profile normalization
- Comprehensive error handling
- Test coverage for core functionality
- Rename Strategy to MLHStrategy throughout the codebase
- Export MLHStrategy as both default and named export
- Force space separator for MLH scopes
- Add proper scope string normalization
- Update documentation with scope examples
- Added type: module to package.json
- Converted strategy.js to use class syntax and ES module exports
- Updated index.js to use ES module imports/exports
- Updated test file to use ES module imports
- Fixed scope handling and MLHStrategy export issues
- Add explicit profile object construction
- Include all required profile fields (displayName, name, emails, phoneNumbers)
- Fix failing test for profile normalization
- Remove normalized field expectations (displayName, name.familyName)
- Add raw field expectations (first_name, last_name)
- Keep strategy functionality unchanged
@erinosher erinosher merged commit 277e8a2 into MLH:main Nov 15, 2024
3 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.

2 participants