-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Authenticate(): Add possibility to return Redirect URL instead of redirecting #345
Comments
It works with Laravel but not in the nicest way. For API-based applications it would be nice to get the authentication url indeed! |
Apologies for the unsolicited advice, but I'm facing a similar scenario :)
Unfortunately there's no session interface in PHP nor in a PSR. If your application uses the |
refs #374 |
@DeepDiver1975 I don't think this issue should be closed. Indeed my comment is answered by #374, but the initial question from @vixducis - retrieve the url instead of immediately redirecting - is not yet solved as |
I think for this we need to split the So that the authenticate function will call an other function that do the checks and return the authenticate url. |
Actually... Although Be aware: the method is used by |
@talasjanos Yes. That currently is our solution; We override |
I've made the modification in a fork, to provide two functions - the original one which redirects, and another public which returns the URL. |
Currently, when calling the
authenticate()
function, you're redirected to the Identity Provider. This assumes that the currently executing script is the frontend in the user's browser. When implementing API-based applications this is of course not the case and you might want to return this URL to the client in order to perform the redirect there.Other use cases might be when a framework (like laravel) is used, you might want to return a RedirectResponse as dictated by the framework in order to make use of it's middleware. This currently isn't feasible.
As the authenticate() function already returns a boolean, an additional function like getAuthenticationUrl() might be needed in order to not break the API for existing users.
``
The text was updated successfully, but these errors were encountered: