diff --git a/components/gdrive_headless_auth.templ b/components/gdrive_headless_auth.templ new file mode 100755 index 0000000..dfab990 --- /dev/null +++ b/components/gdrive_headless_auth.templ @@ -0,0 +1,169 @@ +package components + +import ( + "context" +) + +// GDriveHeadlessAuthData contains data needed for rendering the headless auth page +type GDriveHeadlessAuthData struct { + AuthCommand string + ConfigID string +} + +// GDriveHeadlessAuth renders the headless authentication page for Google Drive/Photos +templ GDriveHeadlessAuth(ctx context.Context, data GDriveHeadlessAuthData) { + // Force the layout to display as authenticated content + @LayoutWithContext("Google Authentication - Headless Mode", ctx) { + + +
+
+
+

+ + Headless Google Authentication +

+ + + Back to Configurations + +
+ +
+
+
+
+ +
+
+

+ You need to authenticate with Google using a web browser. Since you're running GoMFT behind a reverse proxy or in a headless environment, you'll need to complete authentication on a machine with a web browser. +

+
+
+
+ +
+

Step 1: Run the following command on a machine with a web browser

+
+
{ data.AuthCommand }
+ +
+ +
+

What this command does:

+
    +
  • Opens a browser window on the machine where you run it
  • +
  • Allows you to authenticate with Google
  • +
  • Generates an authentication token
  • +
+
+
+ +
+

Step 2: Paste the authentication token below

+

+ After completing authentication in the browser, you'll receive a token. Copy and paste that token here: +

+ +
+ + +
+ + +

The token will look like a long JSON string containing access credentials.

+
+ +
+ + Cancel + + +
+
+
+
+ + +
+
+
+ +
+
+

This authentication process is necessary for GoMFT to access your Google Drive or Google Photos account.

+

The token is only used for authentication and is stored securely. You'll only need to complete this process once for each configuration.

+
+
+
+
+
+ + + } +} \ No newline at end of file diff --git a/components/storage_provider_form.templ b/components/storage_provider_form.templ index c57ea23..3f367d0 100644 --- a/components/storage_provider_form.templ +++ b/components/storage_provider_form.templ @@ -161,12 +161,12 @@ templ formFields(data StorageProviderFormData) { selected="selected" } >OneDrive - -