Skip to content

Torii oAuth Static Redirect Page not served as asset with Ember-CLI-Rails #547

Description

@hhff

Hi there! Thanks so much for this lib - it's made my life super easy! I love it - congrats!

I'm using Torii for integrating Stripe Connect.

The Torii lib has deprecated the redirect_uri for oAuth being a URL that loads your ember app (for security reasons), and now expect that you'll point to their static HTML page instead (in the host app it's available as a static asset at localhost:4200/torii/redirect.html).

When serving the app from Ember CLI Rails, however, the /torii/redirect.html route is not considered an asset, but treated as an Ember route, and thus loads the application (creating the aforementioned security risk).

I'm guessing there's somewhere in Ember-CLI-Rails (or in the rails stack) that is treating .html as an app route rather than an asset.

Of course I could move the redirect page into rails, but ideally, I'd rather serve the page directly from Torii for that it's not something I need to update when upgrading Torii in the future.

Any suggestions for handling this?


Which operating system and version is the project developed on?
Mac OS Sierra

Which version of ruby is the project developed on?
2.3.1

Which version of npm is the project developed on?
Yarn

Which version of ember-cli is the project developed on?
2.14

What is the rails version?
5.1

What is the ember-cli-rails version (from Gemfile)?
0.9

What is the ember-cli-rails-addon version (from package.json)?
0.8

Is your application server multi-threaded
(such as puma and unicorn) or is it multi-process (such as thin and webrick)?

puma

What are the contents of config/initializers/ember.rb?

EmberCli.configure do |c|
  c.app :dash, build_timeout: 60
end

What are the contents of the Rails' view that renders the Ember application?
NA

How are the EmberCLI-related routes defined?

class DashSubdomain
  def self.matches? request
    request.subdomain == 'dash'
  end
end

Rails.application.routes.draw do

  constraints(DashSubdomain) do
    mount_ember_app :dash, to: "/"
  end

  # etc
end

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions