User registration and login through IdCat Mòbil, an authentication method that uses OAuth 2.0 protocol. IdCat mòbil is an identity validator from VÀLid (Validador d'Identitats del Consorci AOC).
User is also verified with a VÀLid authorization.
Add this line to your application's Gemfile:
gem 'decidim-idcat_mobil'And then execute:
bundle installVerifications by default will expire after 90 days but optionally you can set it to your needs by setting the VERIFICATION_EXPIRATION_TIME environment variable.
# change default value from 90 days to a whole year
VERIFICATION_EXPIRATION_TIME=365To use it you have to first configure the omniauth-idcat_mobil.
IdCat mòbil will be available as a configurable OAuth2 strategy.
Check how to configure the strategy in Decidim's related documentation. The summary is that you have to edit your config/secrets.rb and simply enable the strategy:
omniauth:
idcat_mobil:
enabled: true
icon_path: media/images/idcat_mobil-icon.svgRemember to set IDCAT_MOBIL_CLIENT_ID, IDCAT_MOBIL_CLIENT_SECRET and IDCAT_MOBIL_SITE_URL environment variables.
Refer to omniauth-idcat_mobil gem for further documentation.
See Decidim.
Create a dummy app in your application (if not present):
bundle exec rake decidim:generate_external_test_appAnd run tests:
bundle exec rspec spec/The Department d'Exteriors of Generalitat de Catalunya makes this gem available as open source under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE.
Authored by CodiTramuntana.