Update doc for register handler (#151)
This commit is contained in:
parent
62a9c2b11f
commit
74e3f40ca5
1 changed files with 7 additions and 1 deletions
|
@ -61,6 +61,7 @@ import { VercelAPL } from "./vercel-apl";
|
||||||
|
|
||||||
export default createAppRegisterHandler({
|
export default createAppRegisterHandler({
|
||||||
apl: new VercelAPL(),
|
apl: new VercelAPL(),
|
||||||
|
allowedSaleorUrls: ["https://your-saleor.saleor.cloud/graphql/"], // optional, see options below
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -69,6 +70,11 @@ Options provided to handler factory
|
||||||
```typescript
|
```typescript
|
||||||
export type CreateAppRegisterHandlerOptions = {
|
export type CreateAppRegisterHandlerOptions = {
|
||||||
apl: APL;
|
apl: APL;
|
||||||
|
/**
|
||||||
|
* Provide your Saleor /graphql/ endpoints (or functions),
|
||||||
|
* to allow app registration only in allowed Saleor instances.
|
||||||
|
*/
|
||||||
|
allowedSaleorUrls?: Array<string | ((saleorApiUrl: string) => boolean)>;
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -78,4 +84,4 @@ See [APL](./apl.md) for details what is Auth Persistence Layer in Saleor apps
|
||||||
|
|
||||||
App SDK provides a utility that helps building (async) webhook handlers, so app can react on Saleor events.
|
App SDK provides a utility that helps building (async) webhook handlers, so app can react on Saleor events.
|
||||||
|
|
||||||
Read about it [here](./saleor-async-webhook.md).
|
Read about it [here](./saleor-async-webhook.md).
|
||||||
|
|
Loading…
Reference in a new issue