Authorization

Overview

Using the Oauth method allows you to modify the browser URL and jump to the authorization page in the SHOPLINE admin.

For example, when merchants install embedded apps, you can use this method to redirect them to the authorization page.

NameDescriptionReturn value
invokeJump to authorization pagevoid

Parameter description:

NameDescriptionType
scopePermission pointstring, multiple permission points are separated by a comma “,”
appKeyApp's appkeystring
redirectUriApp's callback addressstring

Code example

import { Oauth } from '@shoplinedev/appbridge'
Oauth.create(app).invoke({
scope,
appKey,
redirectUri
})
Was this article helpful to you?