-
Notifications
You must be signed in to change notification settings - Fork 69
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
Custom routes arent fully working #54
Comments
Were you able to solve this? |
Yeah it all works now, using the approach above. Still feels a bit hacky to implement my own code on this package, but it doesnt seem too active at the moment... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is more of a discussion than a bug report.
I am using sub-domains to identify my tenants, not a uuid in the path.
So, one tenant might access my app via:
tenant1.myapplication.com
To achieve this, I have set
saml2.useRoutes
tofalse
, and removed the default UUID from the route.Then, I had to replace the
ResolveTenant
middleware, to find a tenant first from my owntenants
table, then get thesaml2_tenants
via a relationship.I also had to extend part of
OneLoginBuilder
, theconfigDefaultValues
method, to use the correct routes, instead of thisURL::route('saml.metadata', ['uuid' => $this->tenant->uuid])
.This is needed because the current method would generate:
tenant1.myapplication.com/saml2/metadata?uuid=123e4567-e89b-12d3-a456-426614174000
The IdP doesnt like. It would be better as:
tenant1.myapplication.com/saml2/metadata
This isnt much work, but feels like I am going against the package.
Would you be open to a discussion/ a PR around having a new way to resolve tenants based on a saml_tenants.sub_domain value.
Or, ideally, would be to use it from a custom tenant model (#49)!
Right now, its quite an opinionated package, but we could make it GREAT! Im excited to hear your reply!
The text was updated successfully, but these errors were encountered: