Autodesk-Forge / forge-viewhubs

Build tree view of content: Using the jsTree library, this sample shows you how to build a basic tree view of Hubs, Projects, Folders and Items. Supports menus and reloading among other features
MIT License
25 stars 16 forks source link

Application Configuration #2

Closed davewolfe closed 6 years ago

davewolfe commented 7 years ago

I get error 400 invalid redirect uri. I've already defined the keys and my callback, but can't run the sample.

AugustinoJ commented 6 years ago

I get the same 400 uri error. I don't see "api/forge/callback/oauth" in my project. What am I missing?

augustogoncalves commented 6 years ago

you probably need to make sure both projects are starting, the desktop & the web app. click on the solution, then properties, then select start for both projects.

image

@davewolfe sorry I didn't see your initial comment

AugustinoJ commented 6 years ago

There's only one project in this solution image

augustogoncalves commented 6 years ago

Sorry, I misread the project name 😄 #friday

At the web.config file make sure the callback URL is correct and the same you have on Developer Portal. And here the problem: at the readme I suggest using http but the web.config was with https, sorry about that, will fix now.

<add key="FORGE_CALLBACK_URL" value="http://localhost:3000/api/forge/callback/oauth" />
AugustinoJ commented 6 years ago

Thanks Augusto. I'm still not familiar with forge and I'm trying to get started. I thought this project was fully contained and would run right out of the box. I don't know what I'm supposed to have on my Developer Portal and what code I'm supposed to have at that location, if any. I'm trying to get a sample that will show me the tree view that you show in this sample and have it run locally. Is that code not a part of this source? Sorry about the beginner questions ...

augustogoncalves commented 6 years ago

@AugustinoJ then I would suggest you start with our tutorial, which will guide you on Forge in general.

If you just want to run this sample, you still need an Forge account and app, follow this section of the tutorial, then back to this sample, check the run locally section on the readme.

AugustinoJ commented 6 years ago

Augusto, I followed the tutorial that you linked to and everything works great! Thank you for that. I published to AWS Elastic Beanstalk and when I run it, it hangs while loading the Buckets and Objects. It just says "Loading..." with the animation. Any thoughts on that?

augustogoncalves commented 6 years ago

@AugustinoJ this is probably happening because the Forge Client ID & secret were not set... as this is becoming a support, would you mind posting on stack overflow? better to handle support. add autodesk-forge tag

augustogoncalves commented 6 years ago

@AugustinoJ check https://forge.autodesk.com/blog/deploy-forge-net-apps-aws-elastic-beanstalk

AugustinoJ commented 6 years ago

Augusto, Thanks for the video. What are you using for your callback URL for your production app? I'm still having trouble getting mine to run on AWS. Thanks.

augustogoncalves commented 6 years ago

the video focus on the scenario of the tutorial, so callback URL is not used...

as the callback URL locally is http://localhost:3000/api/forge/callback/oauth

and when it goes live you replace the localhost with your app address, on the sample video it was: http://forgesample.us-west-2.elasticbeanstalk.com so the callback URL is: http://forgesample.us-west-2.elasticbeanstalk.com/api/forge/callback/oauth

make sure the callback URL is the same on your AWS settings and on Forge Developer Portal