Megahëlth SSO Setup Instructions
This application supports both OAuth2/OpenID Connect and SAML 2.0 for Single Sign-On (SSO) integration. Follow the instructions below to configure your Identity Provider.
OAuth2/OpenID Connect
No OAuth application configured
SAML 2.0
Entity ID:
https://megahelth.com/saml/metadata
ACS URL:
https://megahelth.com/saml/acs
Quick Links
1
Application Setup
Environment
Application URL: https://megahelth.com
Database Setup
rails db:migrate
2
Okta Configuration
O OAuth2/OpenID Connect
Application Settings
- App Type: Web Application
- Sign-in redirect:
https://megahelth.com/oauth/callback
- Sign-out redirect:
https://megahelth.com
OAuth Endpoints
Authorization:
https://megahelth.com/oauth/authorize
Token:
https://megahelth.com/oauth/token
UserInfo:
https://megahelth.com/oauth/userinfo
S SAML 2.0
SAML Settings
- Single sign-on URL:
https://megahelth.com/saml/acs
- Audience URI:
https://megahelth.com/saml/metadata
- Name ID format: EmailAddress
Required Attributes
email → user.email
name → user.displayName
3
Testing Your Setup
✅ Test SAML Flow
- 1. Visit SAML SSO endpoint
- 2. Login with Okta credentials
- 3. Verify redirect to dashboard
🔍 Verify Configuration
Troubleshooting
Common Issues
- • Invalid redirect URI - check exact match
- • Certificate errors - verify IdP cert format
- • Missing email attribute from IdP
- • CORS issues with application URL
Debug Steps
- • Check Rails logs:
tail -f log/development.log
- • Verify user creation in database
- • Test metadata endpoints
- • Validate SAML assertions