From 44ce69967af7683729041c5cc9fb267100b0b4fe Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Tue, 12 Dec 2023 18:59:12 +0800 Subject: [PATCH 1/2] fix authProvider doc see https://github.com/transloadit/uppy/pull/4672#issuecomment-1850175675 --- blog/2020-03-custom-providers.md | 10 ++++------ docs/companion.md | 4 +++- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/blog/2020-03-custom-providers.md b/blog/2020-03-custom-providers.md index 893ea72dc..e23c40c37 100644 --- a/blog/2020-03-custom-providers.md +++ b/blog/2020-03-custom-providers.md @@ -176,9 +176,9 @@ The constructor of our class will look something like this: ```js class MyCustomProvider { - constructor(options) { - this.authProvider = 'myunsplash'; // the name of our provider (lowercased) - } + static authProvider = 'google'; // the name of the OAuth provider to use (lowercased) + + constructor(options) {} // ... } ``` @@ -305,9 +305,7 @@ const request = require('request'); const BASE_URL = 'https://api.unsplash.com'; class MyCustomProvider { - constructor(options) { - this.authProvider = 'myunsplash'; - } + static authProvider = 'unsplash'; // the name of the OAuth provider to use (lowercased) list({ token, directory }, done) { const path = directory ? `/${directory}/photos` : ''; diff --git a/docs/companion.md b/docs/companion.md index 3702939e4..49e3b1456 100644 --- a/docs/companion.md +++ b/docs/companion.md @@ -828,7 +828,9 @@ with an `Error`): The class must also have: - A unique `static authProvider` string property - a lowercased value which - typically indicates the name of the provider (e.g “dropbox”). + indicates name of the [`grant`](https://github.com/simov/grant) OAuth2 + provider to use (e.g `google` for Google). If your provider doesn’t use + OAuth2, you can omit this property. - A `static` property `static version = 2`, which is the current version of the Companion Provider API. From 9fe56eb3a87996e0f0bbea01108a6c7aa3c208f5 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Tue, 16 Apr 2024 14:51:33 +0200 Subject: [PATCH 2/2] Update blog/2020-03-custom-providers.md --- blog/2020-03-custom-providers.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/blog/2020-03-custom-providers.md b/blog/2020-03-custom-providers.md index e23c40c37..1a2d5deae 100644 --- a/blog/2020-03-custom-providers.md +++ b/blog/2020-03-custom-providers.md @@ -177,8 +177,6 @@ The constructor of our class will look something like this: ```js class MyCustomProvider { static authProvider = 'google'; // the name of the OAuth provider to use (lowercased) - - constructor(options) {} // ... } ```