Authenticating an independent Single Page App

49 views
Skip to first unread message

Nabil Tharwat

unread,
Aug 9, 2021, 2:53:39 AM8/9/21
to Canvas LMS Users
I hope someone can answer my question. We're currently running a Ruby on Rails Canvas using Instructure hosting (AFAIK). Management decided that we need a better app experience overall and so are moving towards a single page application. I looked through the docs but can't find anything on the login flow. 

I found OAuth docs but that's for authenticating apps on the user's behalf. Is there a way to authenticate normally? [Email & password -> send request -> get access & refresh tokens -> interact with API)

The SPA we're building will be on a different domain and will only ever interact with Canvas through the API. 

Nico López

unread,
Aug 9, 2021, 9:31:22 AM8/9/21
to Canvas LMS Users
Hi Nabil,
as far as I know if you wanna use Canvas authentication from a third party app, you should use developer keys https://community.canvaslms.com/t5/Admin-Guide/How-do-I-add-a-developer-key-for-an-account/ta-p/259
Another approach could be to have an external authentication service supported by Canvas. We've been using CAS (open source) for a while without issues, but our use case was single sign on.

Reply all
Reply to author
Forward
0 new messages