This application was developed with the following technologies:
- Ruby
Gems:
- Rails
- devise
- omniauth
- omniauth-github
- omniauth-facebook
- omniauth-google-oauth2
- omniauth-rails_csrf_protection
Application developed in Ruby on Rails as a template to perform user authentication through their social networks. In this system, the following networks were used as a form of authentication in addition, of course, to the creation of a default user with email and password.
- Authentication with Google
- Authentication with Github
- Authentication with Facebook
- Clone the repository:
$ git clone https://github.com/ErnaneJ/Social-Authentication.git
- Install the dependencies
$ bundle install
-
Generate your application on the platform.
-
Take the Client ID and Client Secret and put them in an .ENV file.
See the example. -
Start a server on localhost
$ Rails s
Note: The facebook documentation does not allow the execution of applications linked to facebook without ssl certificate. To enable ssl on localhost generate an ssl key and run rails with it.
$ openssl req -x509 -sha256 -nodes -newkey rsa:2048 -days 365 -keyout localhost.key -out localhost.crt
$ pwd
=> copy path
$ rails s -b 'ssl://localhost:3000?key=/PATH/localhost.key&cert=/PATH/localhost.crt'
Read more about it here.
Project carried out in support of the company Real Seguro Viagem in its internship process.