Initializes the Authentication capability.
Under the hood, this function:
- Gets the
authentication
property from thewindow.canva
object - Throws an error if the
authentication
property is not available - Provides type-safety when using TypeScript
Usage
import { getAuthentication } from "@canva/authentication";const authentication = getAuthentication();console.log(authentication); // => Authentication
Returns
Returns an object that exposes the following methods: