Your Community is getting an upgrade!
Read about our partnership with Higher Logic and how we will build the next generation of the Instructure Community.
Found this content helpful? Log in or sign up to leave a like!
Hi,
Anyone know why I not able to receive an ID Token?
{"messages":["The idToken field is required."],"error":null}
Can you share some of your code? Are you trying to get a token with OAuth? Or are you trying to send an API key you created as a user? At what point is this error coming in?
I am trying to get an ID token with OAuth.
Below is my code,we try to get the ID token during our onPost :
/// <returns></returns>
[HttpPost("tool")]
[Consumes("application/x-www-form-urlencoded")]
[ProducesResponseType(typeof(NoResultResource), 201)]
[ProducesResponseType(typeof(ErrorResource), 400)]
public async Task<IActionResult> OnPostAsync(
[FromForm(Name = "id_token")] string idToken,
[FromForm(Name = "state")] string state = null)
{
_logger.LogInformation($"ID Token:{idToken} State:{state}");
The OAuth flow is two steps: the first step returns a unique code you post back to Canvas to receive the final token.
1. In your app, direct the user to a URL with the following structure:
https://<canvas-install-url>/login/oauth2/auth?client_id=XXX&response_type=code&state=YYY&redirect_uri=https://example.com/oauth_complete
2. On your redirect page, extract the code parameter from the URL querystring. This code is then POSTed back to Canvas for the user.
https://<canvas-install-url>/login/oauth2/token
The payload object should have:
You can store the response from Canvas for your user to reuse the token for subsequent calls. You'll also get a refresh token which can be used to reauthorize after the initial timeout. Check to make sure you're making the second call with the correct call, etc. I also have a Python project validating with OAuth and you can see how that is structured if you would like.
We already do the setup of Canvas with our tools. Unfortunately, we could not get the id token to redirect to our tools.
But we already get all the data required to integrate Canvas with our tools(iss,logint_hint,target_link,lti_message).
We keep getting the error of "54.179.27.209” refused to connect when we are using https://canvas. Instructure.com as iss.
Can I know why it happen? Most of the website we refer tells that we need to use https://canvas. Instructure.com as our iss.
Are we having the problem with the canvas setup actually?
We do folow this setup at our tools. Need some guide for this issue. Thanks.
To interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign InTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign In