Error when redirection to stripe checkout - javascript

I am building out an e-commerce site, with next.js and stripe checkout. I keep running into this error when I am going to checkout. I am using the use-shopping-cart package as well, and I'm starting to think it maybe causing the below response error from stripe-checkout
"error": {
"message": "Invalid API Key provided: undefined",
"type": "invalid_request_error"
}
}
What is super confusing is that the checkout session in created, along with the cart and payment intent (I know this to be true because I can verify this information thru the stripe dashboard). Currently the stripe dashboard does not indicate there is an error either.
Has anyone experienced this, and does anyone have any idea on how to fix it?
Thanks in advance!

the solution is ridiculously easy. I just needed to prefix my env variable with NEXT_PUBLIC_.

Related

Cypress testing Xero Authentication process

I'm attempting to test the Xero Authentication process with Cypress, but I am encountering this error after I login with my correct login details.
Xero Auth Error -
Is there a way to fix this or is there an alternative someone can suggest?
Thank you and have a nice day!
Tried: Connecting to Xero through Cypress
Expecting: Successful Authentication.
The error code indicates your ip address is being blocked by Xero's WAF. Have a look at this article for more information. Stopping actions listed in the article will allow the risk score to reset and restore access after around 24 hours.
https://community.akamai.com/customers/s/article/Why-is-Akamai-blocking-me?language=en_US
If you are not doing any of those things, please reach out to Xero via https://developer.xero.com/contact-xero-developer-platform-support/ with a very recent error code (the one starting #18.xxx) as the code is time-sensitive.

Trying to build a slack bot and facing error "Error: not_allowed_token_type"

Was just trying to build a simple slack bot by following a YouTube link and started getting the error
Error: not_allowed_token_type
const bot = new SlackBot({
token: 'xoxb-TOKEN_GENERATED FROM SLACK SITE',
name: 'escalatorbot' // what name should I give here
})
Can somebody tell why I am facing this error
From your code snippet, I think you're using Slackbots.js and encountering a known problem resulting from recent changes in the slack api. The issue is logged here: https://github.com/mishk0/slack-bot-api/issues/145
The issue is releated with the new granular permissions app in slack, use the legacy bot on this url: https://api.slack.com/apps?new_classic_app=1 and then in Bots you can add legacy bot user and generate correct token
I have not fully understood your use case. On which API you got this error? For now, I can suggest you to use slack built-in tool for testing all API's (https://api.slack.com/methods/api.test/test)

passport Unknown authentication strategy "local", "facebook", "google"

I'm building a register system where a user can login with Facebook, Google, or locally.
Whenever I post via any login strategy I get uknown strategy error. I think I did connect all files all together.
I did check every solution, on stackoverflow, but can't find anything that could help aht the moment.
My code:
https://github.com/ExadelPraktika/Back-exabook/tree/backend_full
added
require('../passport');
in passport.js
it works
You will also get this error if the strategy is not passed to the use command like so:
passport.use("google", strategy);

chrome.identity.getAuthToken returning "bad client id: {0}" error

I'm trying to use chrome.identity.getAuthToken to get a token, but every time I try this error shows up:
OAuth2 request failed: Service responded with error: 'bad client id: {0}'
I have no idea why this is happening. The client ID I put in manifest.json is exactly the same as the one on the Google Developers Console, and the correct scopes is also included:
oauth2: {
"client_id": "NUMBERS-NUMBERS&LETTERS.apps.googleusercontent.com",
"scopes": ["https://www.googleapis.com/auth/SOME_SERVICE"]
}
The extension is up on the webstore, and I don't see why it is still giving the bad client ID error.
What is possibly causing this error? What am I missing here?
Just as a note for myself and for someone run into.
I have encounter this problems with chrome app , the answers is not my problem ,and finally I found the solution for my problem but produce the same error as the question.
As https://developer.chrome.com/apps/app_identity#client_id say is much special for chrome apps, you have to create a separate client id for your chrome app.
Go to the "API Access" navigation menu item and click on the Create an OAuth 2.0 client ID... blue button.
Enter the requested branding information, select the Installed application type.
you must to choose Installed application an set you Application ID.
what's your Application ID ?
chrome-extension://your application id
chrome-extension://gfmehiepojbflifceoplblionpfclfhf/
I overcomed this problem by setting up the email address and product name in "Consent screen" in the Google Developer Console.
Please refer to https://developers.google.com/console/help/new/#userconsent for detail.
I had a similar problem. Everything seemed to work fine on my own laptop, but when i ran it on another device i got that "bad client id" error.
My problem was that the client-id changed from one device to another, as i did not yet upload my extension to the chrome store.
To overcome that problem, i followed the instructions of How to change chrome packaged app id Or Why do we need key field in the manifest.json?.
You need to create a key to keep the client-id persistent through all devices.
Hope that helps finding the right answer for people with the same issue quicker.

Facebook access token issue in JS implementation

I am new to FB apps and trying to get the accessToken for my website using JS. I have followed the steps given on the API docs, but I keep getting an
"error": {
"type": "OAuthException",
"message": "Error validating application."
}
I know that theres some issue with my implementation. Can someone please help me out.
If you can provide a link to a tutorial/code snippet that would be really great.
Since today there is a change in Facebook Graph API, the given access token is now URI-encoded, it may be this your problem, give a look here: http://forum.developers.facebook.net/viewtopic.php?pid=273730

Categories