class Auth1::Generators::InstallGenerator
Public Instance Methods
add_auth0_env_vars()
click to toggle source
# File lib/generators/auth1/install_generator.rb, line 12 def add_auth0_env_vars return unless defined?(Dotenv) inject_into_file '.env.local' do <<~HEREDOC # Values from https://manage.auth0.com/#/applications AUTH0_CLIENT_ID='AUTH0_CLIENT_ID' AUTH0_CLIENT_SECRET='AUTH0_CLIENT_SECRET' AUTH0_DOMAIN='AUTH0_DOMAIN' # URL in your application to redirect to after logout from Auth0 AUTH0_LOGOUT_URL='http://localhost:3000/' HEREDOC end end
update_routes()
click to toggle source
# File lib/generators/auth1/install_generator.rb, line 8 def update_routes route "mount Auth1::Engine => '/'" end