-
Notifications
You must be signed in to change notification settings - Fork 119
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
error when UserSession created with portal token attempts to exchange it for a server token #485
Comments
hi @adepottey 👋 do you know what |
the problem is indeed a result of the fact that Node.js applications that use this library pass along the generic referer header because of this i have a few suggestions:
|
Thanks John, I was able to get this working in my test case using your second suggestion. Here is my code:
|
awesome. thank you for confirming. i'm going to leave this ticket open as a reminder to add a code snippet to the API reference for UserSession as a breadcrumb for other developers in your 👡s. |
I am hoping to use arcgis-rest-js in a middleware component. I have a REST endpoint that basically orchestrates a series of calls to GP and feature services. I get a user-generated token as a parameter and I just pass the token through on all of my service calls.
I am trying to construct a UserSession using the token, but I am getting an error with my logic. I think I probably need to set something else when I am creating the UserSession object but I am not sure what it could be. Any help with this would be appreciated.
Node version 8.12.0
Here is my code:
Here is the error:
The text was updated successfully, but these errors were encountered: