Using your own authentication system

Learn how to authenticate users with your existing authentication system when accessing the Flux Panda Player in Widget Mode.

❗️

This only works when using the Flux Panda Player in Widget Mode

When using the Flux Panda Player in Standalone Mode you have to authenticate users with one of our available login providers.

If your e-commerce store already has a way for customers to login, you can pass the user information to the Flux Panda Player in Widget Mode. The user is then automatically logged in to the chat and can add products to the shopping cart.

FluxPlayer.init({
    apiKey: 'your key',
    channelId: 'your channel id',
    spa: true,
    user: { name: getUserName() },
    onCheckout: async function (data) {
        // Checkout logic goes here
    }
})

function getUserName() {
    // get your customers name from your API
    return "Always Bob";
}