All Articles

@auth directive with 'apikey' provider found, but the project has no api key authentication provider configured.

I usually want to default auth to use cognito, but then i was getting this error you can see in the title.

Later noticed this is the solution when adding an api (a.k.a. running amplify add api):

amplify add api

Additional auth types

UPDATE: Just noticed that i only provided a solution by adding an api. But if you don’t want to recreate it amplify update api should work for you.