18F / identity-oidc-expressjs

An example Login.gov client application which authenticates users via OpenID Connect (OIDC). Built with Node.js, Express.js, and Passport.js.
Other
12 stars 7 forks source link

Authenticate against integration server #6

Closed s2t2 closed 6 years ago

s2t2 commented 6 years ago

Resolves #2

s2t2 commented 6 years ago

Trying to act as the sinatra app, using the following .env file:

#
# Choose a login.gov environment:
#

DISCOVERY_URL="https://idp.int.login.gov/"

#
# Optionally override this application's service provider configuration:
#

CLIENT_ID="urn:gov:gsa:openidconnect:sp:sinatra"
KEY_FILE_PATH="./keys/login-gov/sinatra_demo_sp.key"
PORT="9292"

... but need to figure out how to configure the redirect url:

screen shot 2018-01-12 at 5 20 31 pm

EDIT: some conditional code settings (updating the redirect url) made this work

s2t2 commented 6 years ago

Logging in works, but after trying to further revise this app to act as the sinatra app to get logging out to work, I realize I would need to change this application's logout paths (and the corresponding passport authentication) for logging out to work properly. And I'm already noticing too much temporary sinatra-app-related code. So I'm deciding to just wait until this application's credentials get deployed to the integration server. A PR with the credentials was merged yesterday into the identity-idp repo, so it should only be a matter of days.

s2t2 commented 6 years ago

superseded by #8