Refactor project structure and fix issues #60 and #67#70
Merged
developerkunal merged 7 commits intomasterfrom Jan 21, 2026
Merged
Refactor project structure and fix issues #60 and #67#70developerkunal merged 7 commits intomasterfrom
developerkunal merged 7 commits intomasterfrom
Conversation
- Reorganized code into cmd/ and internal/ directories following Go best practices - Split authentication logic into separate modules (claims, middleware, validator) - Extracted configuration into dedicated config package - Moved API handlers into separate handlers package - Updated dependencies and build configurations - Fixed issue #67: Added CORS support with WithValidateOnOptions(false) to allow OPTIONS preflight requests - Fixed issue #60: Added comprehensive setup documentation for RBAC and M2M permissions - Added screenshots showing Auth0 Dashboard configuration steps - Updated README with detailed instructions to prevent empty permissions array Closes #60 Closes #67
- Added GitHub Actions workflow for automated testing - Uses ubuntu-20.04 runner with Go 1.24 and Node.js 20 - Clones latest test scripts from main branch - Removed CircleCI configuration - Removed semgrep workflow - Maintains same test coverage with modern CI/CD platform
There was a problem hiding this comment.
Pull request overview
This pull request modernizes a Go-based Auth0 API authorization sample by refactoring the project structure, fixing CORS preflight issues, updating documentation for RBAC configuration, and migrating from CircleCI to GitHub Actions.
Changes:
- Refactored code into
cmd/andinternal/directories following Go best practices with separated auth modules - Fixed CORS preflight validation by adding
WithValidateOnOptions(false)to JWT middleware - Migrated CI/CD from CircleCI to GitHub Actions with updated test workflows
- Updated dependencies from go-jwt-middleware v2 to v3
Reviewed changes
Copilot reviewed 19 out of 22 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| LICENSE | Updated copyright year to 2026 |
| 01-Authorization-RS256/go.mod | Updated module path, Go version, and dependencies to v3 |
| 01-Authorization-RS256/Dockerfile | Updated to Go 1.24 and changed port from 3010 to 8080 |
| 01-Authorization-RS256/cmd/server/main.go | New application entry point with graceful shutdown |
| 01-Authorization-RS256/internal/auth/*.go | Extracted auth logic into separate modules (claims, middleware, validator) |
| 01-Authorization-RS256/internal/config/auth.go | Extracted configuration loading |
| 01-Authorization-RS256/internal/handlers/api.go | Extracted HTTP handlers |
| .github/workflows/test.yml | New GitHub Actions workflow for automated testing |
| 01-Authorization-RS256/exec.* | Updated port from 3010 to 8080 |
| assets/enable-rbac-settings.png | Added screenshot for RBAC documentation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
duedares-rvj
approved these changes
Jan 20, 2026
duedares-rvj
approved these changes
Jan 20, 2026
- Created new 01-Quickstart-Go-API folder with refactored code using Go 1.24 and v3 SDK - Reverted 01-Authorization-RS256 to original state for backward compatibility - Updated GitHub Actions workflow to test both samples independently - Fixed all module paths and import references in new folder - Added CORS support with WithValidateOnOptions(false) - Enhanced RBAC documentation with setup screenshots - Updated .gitignore and dependabot.yml for dual-folder structure - Removed 'Available Samples' section from main README
duedares-rvj
approved these changes
Jan 21, 2026
gyaneshgouraw-okta
approved these changes
Jan 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔧 Changes
Added a new modernized Go API sample (
01-Quickstart-Go-API) with improved project structure and enhanced functionality:New Sample Structure:
cmd/andinternal/package layout following Go best practicesKey Features:
jwtmiddleware.WithValidateOnOptions(false)to handle preflight requestsCI/CD Improvements:
📚 References
🔬 Testing
Automated Testing:
01-Authorization-RS256) tested on port 301001-Quickstart-Go-API) tested on port 8080Manual Testing:
Test Coverage:
read:messagespermission)📝 Checklist