0
votes

I have an existing Rails application that uses Devise for auth. I have been adding an Ember application, using Ember-CLI-Rails with Simple Auth. Everything is working just fine.

But I now have an additional complication, which is that a third party organization would like to be able to automatically register/login users using LTI/OAuth –– so that they can jump straight from their application to ours without having to register or login, and then start working in our application as logged in users.

I'm having trouble wrapping my head around if and how this can all fit together and work?

I'm thinking through the possibility that I move login/session back to Rails? Or that I could possibly have multiple auth types in Simple Auth? etc.

Any thoughts or advice on this much appreciated!

1

1 Answers

-1
votes

You can roll your own Oauth piggybacking on Devise

The provided example is for Facebook, but you'll use this Omniauth strategy

Essentially what you need to do is construct your own Oauth 2.0 Omniauth strategy, add Omniauthable functions (from Devise) to your users, extending your own custom callbacks controller, and a custom user constructor that reads data from the Oauth handshake.