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

Canvas and Page Tab URLs must not end with a slash #177

Open
wants to merge 2 commits into
base: 3.0
Choose a base branch
from
Open

Canvas and Page Tab URLs must not end with a slash #177

wants to merge 2 commits into from

Commits on Jun 7, 2017

  1. Canvas and Page Tab URLs must not end with a slash

    While implementing Login From App Canvas as described here I encountered some problems. I think the solution I've found should be described in the Troubleshooting section. The main problem is that if Canvas or Page Tab URL has a trailing slash then web server performs a 301 redirect and the POST'ed signed_request is lost. Also I think that Route::match(['get', 'post'] is wrong (and in my case it was misleading) because both Canvas and PageTab helpers will always obtain null access token from a GET request. It should be Route::post in both examples.
    apasov authored Jun 7, 2017
    Configuration menu
    Copy the full SHA
    ebf6008 View commit details
    Browse the repository at this point in the history

Commits on Jul 26, 2017

  1. revert the route back to both GET and POST

    Hey @SammyK! Thanks, I'm glad my contribution was useful! Ok, I reverted the route back to both POST and GET. However, I still think it's not a very good solution. I believe that for the situation you described a much better approach would be to create a separate GET route without CanvasHelper token validation logic in it, rather then combine both POST and GET in a single route. But that's just my opinion. :)
    apasov authored Jul 26, 2017
    Configuration menu
    Copy the full SHA
    cea7d05 View commit details
    Browse the repository at this point in the history