atomicjolt / lti_starter_app Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Hi,
When i try to launch the LTI application from Canvas LMS, first it shows the atomicjolt LTI's authorize page when i click the Authorize button it is redirects to the LMS login page, after login it again redirects to the LTI application's aiuthorization page. Anybody please help me to find the solution.
Hi AJers,
I've just spun up a new lti-starter-app with the latest changes.
I was getting RuntimeError (Please specify a valid oauth_consumer_key or valid domain name for this request):
until I swapped out the following in apartment.rb and it's back working.
THIS IS NOT WORKING IN LATEST REPO
Rails.application.config.middleware.insert_before "Warden::Manager", "Apartment::Elevators::Generic", lambda { |request|
key = request.params["oauth_consumer_key"]
host = request.host_with_port
if application_instance = ApplicationInstance.find_by(lti_key: key) || ApplicationInstance.find_by(domain: host)
application_instance.tenant
else
raise "Please specify a valid oauth_consumer_key or valid domain name for this request"
end
}
THIS IS WORKING FROM PREVIOUS REPO
Rails.application.config.middleware.insert_before 'Warden::Manager', 'Apartment::Elevators::Generic', lambda { |request|
if lti_key = request.params["oauth_consumer_key"]
ApplicationInstance.find_by(lti_key: lti_key).try(:lti_key)
end
}
I'm also getting a couple of warnings but I think the first is a known issue with OmniAuth:
WARN -- : You are setting a key that conflicts with a built-in method OmniAuth::AuthHash::InfoHash#name defined at /Users/131432/.rvm/gems/ruby-2.3.1@SocialWidgets/gems/omniauth-1.3.2/lib/omniauth/auth_hash.rb:34. This can cause unexpected behavior when accessing the key via as a property. You can still access the key via the #[] method.
/gems/lms-api-1.2.4/lib/lms/canvas_urls.rb:498: warning: key "PEER_REVIEWS_CREATE_PEER_REVIEW_COURSES" is duplicated and overwritten on line 500
Am I okay to continue using the previous Warden_Manager? It won't blow anything up?
Cheers
Sonya
Hello,
First of all I wanted to say that I love this lti_starter_app template, I'm working through some of the related YouTube tutorial videos on this template and they're proving very helpful; thank you so much for all of this content. Right now I appear to be at an impasse with an error in the code that won't allow me to proceed. I seem to be stuck at the database creation when I run rake db:setup
and/or rake db:seed
When the script gets to the point of seeding the application instances, I run into this error:
CREATED ADMIN USER: [email protected] *** Seeding Sites *** Creating site: https://localhost:3000/ *** Seeding Applications *** Creating application: LTI Admin *** Seeding Application Instances *** rake aborted! NoMethodError: undefined method ``id' for nil:NilClass /Users/Dan/Documents_Local/devlocal/canvas/atomic_jolt/LTI_Starter/LTI-SAKs/lti_saks_4/db/seeds.rb:135:in ``block in setup_application_instances' /Users/Dan/Documents_Local/devlocal/canvas/atomic_jolt/LTI_Starter/LTI-SAKs/lti_saks_4/db/seeds.rb:133:in ``each' /Users/Dan/Documents_Local/devlocal/canvas/atomic_jolt/LTI_Starter/LTI-SAKs/lti_saks_4/db/seeds.rb:133:in ``setup_application_instances' /Users/Dan/Documents_Local/devlocal/canvas/atomic_jolt/LTI_Starter/LTI-SAKs/lti_saks_4/db/seeds.rb:196:in ``block in <top (required)>' /Users/Dan/Documents_Local/devlocal/canvas/atomic_jolt/LTI_Starter/LTI-SAKs/lti_saks_4/db/seeds.rb:187:in ``each' /Users/Dan/Documents_Local/devlocal/canvas/atomic_jolt/LTI_Starter/LTI-SAKs/lti_saks_4/db/seeds.rb:187:in ``<top (required)>' Tasks: TOP => db:setup => db:seed (See full trace by running task with --trace)
It seems to me that the main issue is traced to attrs = attrs.merge(site_id: site.id)
on line number 135. I'm not sure that site_id
is defined in the template initially, and any attempts to give it a numerical value in various ways (hard coding it in the seeds.rb, defining in the secrets.yml and in .env) have failed. Would someone be able to guide me to a solution for this error? Thank you so much!
Hi,
I have an issue like, when i manually reload the application or click on the Admin users link or any users link it automatically log out and redirect to the Login page. Is this a bug? if not, could you please guide me to solve this issue.
Thank you.
Hi there,
Setting up this repo and I hit a few errors. Thought I'd share them here for good measure as they were quick and easy fixes.
Error 1
undefined method
for' for #Devise::ParameterSanitizer:0x007fecfeb4bef8`
so I changed 'for' to 'permit' in registrations_controller.rb based on this suggestion which worked.
Error 2
NameError - undefined local variable or method
new_canvas_authentication_path' for #<#Class:0x007fcc624046e8:0x007fcc69eac0d0>
Did you mean? new_admin_canvas_authentication_path:`
so I added 'admin' to the _links.html.erb which worked.
Newbie Error: Email confirmation
Got the app up and running and when signing up, I didn't receive an email. It took me a few minutes til I found it in the terminal #newbie. Then I just copied the href into the browser to confirm the account #bingo
`Devise::Mailer#confirmation_instructions: processed outbound mail in 247.2ms
Sent mail to [email protected] (9.1ms)
Date: Fri, 04 Nov 2016 13:05:05 +1100
From: [email protected]
Reply-To: [email protected]
To: [email protected]
Message-ID: [email protected]
Subject: Confirmation instructions
Mime-Version: 1.0
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
Welcome [email protected]!
You can confirm your account email through the link below:
`Error 3
When signing out:
ActionController::RoutingError at /users/sign_out uninitialized constant UsersController
Still working on this one and will update once I've worked it out.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.