Skip to content

Commit

Permalink
fix(auth): prepare token in authentication route before redirecting
Browse files Browse the repository at this point in the history
  • Loading branch information
wisley7l committed Mar 11, 2024
1 parent ff78c3f commit 229e6fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion functions/routes/bling/authentication.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ exports.get = async ({ appSdk, admin }, req, res) => {
.then(async (auth) => {
try {
getAppData({ appSdk, storeId, auth })
.then(appData => {
.then(async (appData) => {
const { client_id: clienteId, client_secret: clientSecret } = appData
console.log('Pass variables', JSON.stringify({ clienteId, clientSecret, code, storeId }))
const bling = new Bling(clienteId, clientSecret, code, storeId)
await bling.preparing
setTimeout(() => {
return res.status(200).redirect('https://app.e-com.plus/#/apps/edit/102418/')
}, 4000)
Expand Down

0 comments on commit 229e6fd

Please sign in to comment.