You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{"status":401,"error":"Unauthorized","details":{"description":"No Ltik or ID Token found.","message":"NO_LTIK_OR_IDTOKEN_FOUND","bodyReceived":{}}}
#169
@Cvmcosta I am new to LTIJS integration. Actually I am trying to create LTI 1.3 tool for coursera LMS using sample code provided by you.
But when I try to launch tool from coursera its showing me "{"status":401,"error":"Unauthorized","details":{"description":"No Ltik or ID Token found.","message":"NO_LTIK_OR_IDTOKEN_FOUND","bodyReceived":{}}}" this error.
lti.setup(LTI-key,
{
url: process.env.DB_HOST + '/' + process.env.DB_NAME,
connection: { user: process.env.DB_USER, pass: process.env.DB_PASS }
},
{ // Options
appRoute: '/', loginRoute: '/login', // Optionally, specify some of the reserved routes
cookies: {
secure: false, // Set secure to true if the testing platform is in a different domain and https is being used
sameSite: '' // Set sameSite to 'None' if the testing platform is in a different domain and https is being used
},
devMode: true
}
)
@Cvmcosta I am new to LTIJS integration. Actually I am trying to create LTI 1.3 tool for coursera LMS using sample code provided by you.
But when I try to launch tool from coursera its showing me "{"status":401,"error":"Unauthorized","details":{"description":"No Ltik or ID Token found.","message":"NO_LTIK_OR_IDTOKEN_FOUND","bodyReceived":{}}}" this error.
Below is index.js that am using,
require('dotenv').config();
const path = require('path');
const routes = require('./src/routes');
const lti = require('ltijs').Provider;
let consumerAccessTokenURL = "https://api.coursera.org/api/lti/auth/accessToken/1220~sharedsuccessorg";
let consumerAuthorizationURL = "https://api.coursera.org/api/lti/auth/token";
let consumerToolClientID = "4G4uXxHdSqauLl8R3WqmXw" ;
let consumerName = "coursera";
let consumerUrl = "https://coursera.org";
let consumerAuthorizationconfig = {
method: "JWK_SET",
key: "https://api.coursera.org/api/lti/keyset"
};
const LTI-key = "li737drHRR+O2MLCmur0nHahZ0Z2kBP10HAKRUm39NIrKummL3Ja4xzDZIX1JltP";
lti.setup(LTI-key,
{
url: process.env.DB_HOST + '/' + process.env.DB_NAME,
connection: { user: process.env.DB_USER, pass: process.env.DB_PASS }
},
{ // Options
appRoute: '/', loginRoute: '/login', // Optionally, specify some of the reserved routes
cookies: {
secure: false, // Set secure to true if the testing platform is in a different domain and https is being used
sameSite: '' // Set sameSite to 'None' if the testing platform is in a different domain and https is being used
},
devMode: true
}
)
// Setting up routes
//lti.app.use(routes)
const setup = async () => {
lti.appUrl('/');
lti.loginUrl('/login');
await lti.deploy({port: 3000});
lti.whitelist(lti.appRoute(), { route: '/', method: 'get' })
let platform = await lti.registerPlatform({
url: consumerUrl,
name: consumerName,
clientId: consumerToolClientID,
authenticationEndpoint: consumerAuthorizationURL,
accesstokenEndpoint: consumerAccessTokenURL,
authConfig: consumerAuthorizationconfig
})
//console.log('the platform after the set is', platform);
const key = await platform.platformPublicKey()
// console.log('key',key)
// Set connection callback
lti.onConnect((connection, request, response) => {
// Call redirect function
lti.redirect(response, '/main')
})
// Set route accounting for issuer context
lti.app.get('/:iss/main', (req, res) => {
// Id token
console.log(res.locals.token)
res.send('It's alive!')
})
console.log("Outside onConnect");
}
setup();
module.exports = lti.app;
Please find attachment for launch, auth & redirect url setting.
Can you please help me out exactly where am going wrong.
The text was updated successfully, but these errors were encountered: