-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Hello,
I would like to obtain user information from Wix in order to use Wix's payment system on the web I operate.
I created a Wix client and entered all key values correctly.
However, an error occurs as shown in the picture below. Please tell me the solution.
If this can be resolved, I will load the user information into Wix , log in the user, and proceed with the payment.
Please let me know if this is a realistic logic after resolving the error. You will use a different domain than the domain of the web page created by Wix. I want to load information about Wix from that domain and enable the loaded users to make payments.
- Why did this problem occur, and is there a way to solve this problem?
- I attach the code below.
- My webpage is composed of nextjs.
useEffect(() => {
async function fetchSession() {
const session = await getSession();
if (session) {
setUserEmail(session.user.email);
const client = createClient({
modules: {
authentication,
members,
},
auth: ApiKeyStrategy({
apiKey: process.env.API_KEY,
accountId: process.env.ACCOUNT_ID,
siteId: process.env.SITE_ID,
}),
});
console.log(session.user.email);
const user = await client.members
.queryMembers()
.eq('loginEmail', session.user.email)
.find().catch((error) => {
console.error("=====>>" + error + "<<====");
}
);
}
}
fetchSession();
}, []);
Metadata
Metadata
Assignees
Labels
No labels