Note: This repo is managed by the VSP-Identity team. Please reference our main product page here for contact information and questions.
An example app built with Sinatra that interfaces with Sign-in Service.
- Ruby 3.2.1
Currently, SignInService is available as a part of vets-api
- Clone Repo
git clone git@github.com:department-of-veterans-affairs/vets-api.git- Follow setup instructions for vets-api
- Ensure your database is prpoerly seeded
rails db:seedthis will add the necessary client configurations
This application uses the SignInService Ruby Client
- You will see the base config in
.env(these match the default client config invets-api)
# .env
SIS_CLIENT_ID='sample_client_web'
SIS_BASE_URL='http://localhost:3000'
SIS_AUTH_TYPE='cookie'- The default auth type for this app is
cookie. If you want to useapichange your config in .env.local to the correct client and auth_type.
# .env.local
SIS_CLIENT_ID='sample_client_api'
SIS_BASE_URL='http://localhost:3000'
SIS_AUTH_TYPE='api'- Configure the SignInServiceClient in
config.ru.
# config.ru
SignInService.configure do |config|
config.base_url = ENV.fetch('SIS_BASE_URL')
config.client_id = ENV.fetch('SIS_CLIENT_ID')
config.auth_type = ENV.fetch('SIS_AUTH_TYPE').to_sym
end- Start the Sign-in Service server (
vets-api)
vets-api % rails sSetup the app:
bin/setupStart the server:
bin/serverBy default the server will be running on http://localhost:4567
Build image and start container
bin/upThe server will be running on http://localhost:4567
Remove container and cleanup
bin/downTo run the the rspec test suite:
bin/testTo run the rubocop linter:
bin/lint