Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Osso #1

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Implement Osso #1

wants to merge 5 commits into from

Conversation

sbauch
Copy link

@sbauch sbauch commented Dec 16, 2020

This PR serves as an example of adding Osso to a real world Rails app.

The base application, forem/forem is the open source community software that powers dev.to.

Forem already implemented OAuth for Github, Twitter and Facebook, so this was a straightforward task of fitting Osso into the existing Authentication::Providers.

There were a couple of sticky points -

• forem's omniauth hash handling didnt find our raw_info which was unexpected, maybe TODO

• Honeybadger was awfully hard to turn off!

Comment on lines +158 to +160
if raw_info&.created_at.present?
Time.zone.parse(raw_info.created_at)
elsif raw_info.auth_time.present?
elsif raw_info&.auth_time.present?
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was throwing a no method error with raw_info being nil


class Osso < Provider
OFFICIAL_NAME = "SAML SSO".freeze
SETTINGS_URL = "https://ossoapp.com".freeze # TODO
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can read off ENV to send to admin ui

# Learn more about Osso at https://ossoapp.com

class Osso < Provider
OFFICIAL_NAME = "SAML SSO".freeze
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd probably want to use ENV vars here if I were actually adding this to forem. if its an internal community, it might be "Sign in with EnterpriseCo Okta". but in multi-tenancy, we expect folks to be more generic and not use "Osso".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant