-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add dynamic
success_redirect
URLs to be generated (#57)
This allows a `proc` to be used as a `success_redirect` value. This is particularly useful if you need to generated URLs based on the one of the parameters returned or applied during the callback function. It is of particular interest in CoderDojo frontend, which needs to send a user to Zen to log in, but also redirect the user back to the correct page in CoderDojo frontend afterwards. So the Zen URL will need to have a dynamic returnTo parameter based on the original returnTo param supplied to omniauth. ## Considerations * The proc is executed using `instance_exec` to make sure it is run in the context of the controller, rather than the context of the configuration block where it is first defined. * I've tried to document this as best as possible!
- Loading branch information
Showing
5 changed files
with
102 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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