feat(auth): log full stored token data after OAuth completes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
2ceb4b0d90
commit
adceb29f65
5
auth.js
5
auth.js
@ -58,7 +58,6 @@ router.get("/auth/callback", async (req, res) => {
|
||||
}
|
||||
|
||||
// Fallback: always try to resolve a locationId from the store's primary location
|
||||
const { getToken } = require("./tokenStore");
|
||||
const saved = getToken(shop);
|
||||
if (!saved?.locationId) {
|
||||
try {
|
||||
@ -78,6 +77,10 @@ router.get("/auth/callback", async (req, res) => {
|
||||
}
|
||||
}
|
||||
|
||||
const { getToken } = require("./tokenStore");
|
||||
const finalToken = getToken(shop);
|
||||
log(shop, `Auth complete. Stored token:\n${JSON.stringify(finalToken, null, 2)}`);
|
||||
|
||||
const redirectTarget = process.env.SHOPIFY_AFTER_AUTH_REDIRECT || "https://admin.shopify.com";
|
||||
return res.redirect(redirectTarget);
|
||||
} catch (err) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user