Closed SaileshKumar closed 3 years ago
Hey! 👋 Thanks for raising this! As I attempt to reproduce this issue, would you mind providing me with some more information like if you're also using auth in your project? If so, how is it configured?
I tried adding auth with amplify add auth, and was trying to add some auth rules like owner can delete/edit, people in admin group can do anything, only people in teacher group, and anyone can read.
When I couldn't figure out why it was broken, I tried to remove the auth rules and re push, but the queries still broke in the tool...
Feel free to poke around in there if you're able to! Project is called Ruso
In the Amplify Web Tool it says my auth mode is Cognito User Pool
Thank you! Sounds like you're using a pretty normal auth configuration. Quick question, just because I've made this mistake before (not too long ago either) - do you login as a user in your User Pool when using the AppSync console?
I don't think the GraphQL API is public and can only be queried by authenticated users, including in the Console.
If I am not logged in and run a query, I get this back
Ah wait that's definitely it...thank you!
What's the difference between the client and clientWeb that show up under client ID? I used clientWeb and it worked great :), but was curious what the difference was...
You're very welcome. I'm glad that I was able to help :)
Here's an explanation from the team on why this is the case:
"JavaScript client libraries cannot use a client which has a secret attached. Amplify CLI creates both for people as a convenience and the web one doesn't have a secret."
Also, as I am also learning more about this, here is an article from OAuth I found on client ids and secrets that might be helpful as well https://www.oauth.com/oauth2-servers/client-registration/client-id-secret/
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server *-help
channels or Discussions for those types of questions.
Before opening, please confirm:
JavaScript Framework
React
Amplify APIs
GraphQL API
Amplify Categories
No response
Environment information
Describe the bug
Can't run basic queries in AQS App Sync Console, and no information provided in the error log:
Expected behavior
Should return the results from the query (and return all classes). This worked last week, but it stopped working around the same time I was trying to add @auth (might be a red herring since when I took off @auth it was still broken). Is it possible this is my API keys being expired? I thought they'd renew every time I pushed or something...
Reproduction steps
Add my schema.graphql, amplify push, and try to run queries
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response