Beartropy SAML2
1. Configure .env
Add the basic configuration to your .env file:
1# Your app's Entity ID2SAML2_SP_ENTITY_ID=https://your-app.com3 4# Redirects5SAML2_LOGIN_REDIRECT=/dashboard6SAML2_LOGOUT_REDIRECT=/
2. Generate SP Certificates (Recommended)
Generate certificates for signing SAML requests:
1php artisan saml2:generate-cert
3. Create IDP
Create an IDP from a metadata URL or interactively:
1# Create IDP from metadata URL2php artisan saml2:create-idp azure --from-url=https://login.microsoftonline.com/{tenant}/federationmetadata.xml3 4# Create IDP interactively5php artisan saml2:create-idp azure --interactive
4. Verify Configuration
List all configured IDPs:
1php artisan saml2:list-idps
5. Test IDP
Test the IDP configuration:
1php artisan saml2:test-idp azure
Resetting Setup
If you need to re-run the setup wizard:
1# Reset setup state only (keeps IDPs)2php artisan saml2:reset-setup3 4# Reset setup state AND delete all IDPs5php artisan saml2:reset-setup --with-idps