Created
July 6, 2012 23:05
-
-
Save reqshark/3063261 to your computer and use it in GitHub Desktop.
sorcery config file
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
Rails.application.config.sorcery.submodules = [:reset_password, :activity_logging, :external, :remember_me] | |
Rails.application.config.sorcery.configure do |config| | |
config.not_authenticated_action = :not_authenticated | |
config.save_return_to_url = true | |
config.cookie_domain = sorcery.kickr.io | |
# -- session timeout -- | |
# config.session_timeout = 3600 | |
# config.session_timeout_from_last_action = false | |
# -- activity logging -- | |
config.register_login_time = true | |
config.register_logout_time = true | |
config.register_last_activity_time = true | |
# -- external -- | |
config.external_providers = [:twitter, :facebook, :github, :google] | |
# You can change it by your local ca_file. i.e. '/etc/pki/tls/certs/ca-bundle.crt' | |
# Path to ca_file. By default use a internal ca-bundle.crt. | |
# Default: `'path/to/ca_file'` | |
# | |
# config.ca_file = | |
# Twitter wil not accept any requests nor redirect uri containing localhost, | |
# make sure you use 0.0.0.0:3000 to access your app in development | |
# config.twitter.key = "" | |
# config.twitter.secret = "" | |
# config.twitter.callback_url = "http://0.0.0.0:3000/oauth/callback?provider=twitter" | |
# config.twitter.user_info_mapping = {:email => "screen_name"} | |
# | |
# config.facebook.key = "" | |
# config.facebook.secret = "" | |
# config.facebook.callback_url = "http://0.0.0.0:3000/oauth/callback?provider=facebook" | |
# config.facebook.user_info_mapping = {:email => "name"} | |
# | |
# config.github.key = "" | |
# config.github.secret = "" | |
# config.github.callback_url = "http://0.0.0.0:3000/oauth/callback?provider=github" | |
# config.github.user_info_mapping = {:email => "name"} | |
# | |
# config.google.key = "" | |
# config.google.secret = "" | |
# config.google.callback_url = "http://0.0.0.0:3000/oauth/callback?provider=google" | |
# config.google.user_info_mapping = {:email => "email", :username => "name"} | |
# | |
# To use liveid in development mode you have to replace mydomain.com with | |
# a valid domain even in development. To use a valid domain in development | |
# simply add your domain in your /etc/hosts file in front of 127.0.0.1 | |
# config.liveid.key = "" | |
# config.liveid.secret = "" | |
# config.liveid.callback_url = "http://mydomain.com:3000/oauth/callback?provider=liveid" | |
# config.liveid.user_info_mapping = {:username => "name"} | |
# --- user config --- | |
config.user_config do |user| | |
user.username_attribute_names = [:email] | |
user.password_attribute_name = :password | |
user.crypted_password_attribute_name = :crypted_password | |
# -- user_activation -- | |
# user.activation_state_attribute_name = :activation_state | |
# user.activation_token_attribute_name = :activation_token | |
# user.activation_token_expires_at_attribute_name = :activation_token_expires_at | |
# user.activation_token_expiration_period = nil | |
# user.user_activation_mailer = UserMailer | |
# user.activation_mailer_disabled = false | |
# user.activation_needed_email_method_name = :activation_needed_email | |
# user.activation_success_email_method_name = :activation_success_email | |
# do you want to prevent or allow users that did not activate by email to login? | |
# Default: `true` | |
# user.prevent_non_active_users_to_login = false | |
user.reset_password_token_attribute_name = :reset_password_token | |
user.reset_password_token_expires_at_attribute_name = :reset_password_token_expires_at | |
user.reset_password_email_sent_at_attribute_name = :reset_password_email_sent_at | |
user.reset_password_mailer = UserMailer | |
user.reset_password_email_method_name = :reset_password_email | |
user.reset_password_mailer_disabled = false | |
user.reset_password_expiration_period = nil | |
user.reset_password_time_between_emails = 5 * 60 | |
# -- activity logging -- | |
user.last_login_at_attribute_name = :last_login_at | |
user.last_logout_at_attribute_name = :last_logout_at | |
user.last_activity_at_attribute_name = :last_activity_at | |
# How long since last activity is he user defined logged out? | |
#user.activity_timeout = 10 * 60 | |
# -- external -- | |
user.authentications_class = Authentication | |
user.authentications_user_id_attribute_name = :user_id | |
user.provider_attribute_name = :provider | |
user.provider_uid_attribute_name = :uid | |
end | |
config.user_class = "User" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment