{"id":3977,"date":"2022-09-17T09:55:28","date_gmt":"2022-09-17T00:55:28","guid":{"rendered":"https:\/\/blog.wsd.sh\/?p=3977"},"modified":"2022-09-17T10:08:27","modified_gmt":"2022-09-17T01:08:27","slug":"why-does-next-auth-say-that-client_id-is-required-even-though-in-discord-providers-there-clearly-is-a-client_id","status":"publish","type":"post","link":"https:\/\/blog.wsd.sh\/?p=3977","title":{"rendered":"<small>https:\/\/next-auth.js.org\/errors#get_authorization_url_error client_id is required<\/small>"},"content":{"rendered":"<p>1. Error<\/p>\n<pre>\r\nhttps:\/\/next-auth.js.org\/errors#get_authorization_url_error client_id is required {\r\n  message: 'client_id is required',\r\n<\/pre>\n<p>2. Error message is unkind<\/p>\n<pre>\r\nclient_id -> clientId\r\n<\/pre>\n<p>3. Cause<br \/>\nBecause clientId is not set in [ &#8230;nexauth.ts] <\/p>\n<p>4. Check  value of clientId<\/p>\n<pre>\r\n  providers: [\r\n    GithubProvider({\r\n      clientId: process.env.GITHUB_CLIENT_ID,\r\n      clientSecret: process.env.GITHUB_CLIENT_SECRET,\r\n    }),\r\n\r\n    GoogleProvider({\r\n      clientId: process.env.GOOGLE_CLIENT_ID,\r\n      clientSecret: process.env.GOOGLE_CLIENT_SECRET,\r\n    }),\r\n\r\n  ],\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>1. Error https:\/\/next-auth.js.org\/errors#get_authorization_url_error client_id is required { message: &#8216;client_&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=\/wp\/v2\/posts\/3977"}],"collection":[{"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3977"}],"version-history":[{"count":11,"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=\/wp\/v2\/posts\/3977\/revisions"}],"predecessor-version":[{"id":3979,"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=\/wp\/v2\/posts\/3977\/revisions\/3979"}],"wp:attachment":[{"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3977"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3977"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3977"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}