We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b9b23dc commit bbc5dbcCopy full SHA for bbc5dbc
pages/api/auth/[...nextauth].js
@@ -88,6 +88,12 @@ const refreshAccessToken = async (token) => {
88
throw refreshedTokens
89
}
90
91
+ // add the webstore webhook if it isn't there
92
+ const data = await getWebhookConfig(refreshedTokens.access_token)
93
+ if(!data?.id) {
94
+ createWebhookConfig(refreshedTokens.access_token)
95
+ }
96
+
97
return {
98
...token,
99
accessToken: refreshedTokens.access_token,
0 commit comments