neroniaky / angular2-token-example

:key: Example for Angular2-Token (a token based authentication) with Devise Token Auth and Rails 5.0 API.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SignInOAuth does not work with api-only rails app

roterski opened this issue · comments

Rendering rails parts are needed for devise_auth_token OAuth flow to work. It boils down to figuring out which middlewares are needed to be added here.

Do you think devise_auth_token is still being maintained? Your PR seems to sit there for quite a while already.

Yeah, devise_auth_token devs have not been very active lately but I wouldn't yet say it's abandoned - maybe just overwhelmed with PRs and issues.

Anyway, my PR solves that double slash issue but it's not critical at all - turns out redirection works fine even with the double slash. You can see it on my example app.
There I've experienced the same problem angular2-token-example has. It was because of missing rendering middlewares. I was lazy so I fixed that by just making regular rails app, instead of using api-only mode. However, I'm convinced that it's possible to tweak api-only app to work with it just fine.

This example has been merged into the main repository. Please refer to https://github.com/neroniaky/angular-token if you have any questions. Thanks!