Skip to content

Commit 8dd6a4a

Browse files
author
Jayden Thorup
committed
Update 1Password authentication instructions to show both SDK and CLI options
- Shows both desktop app (biometric) and CLI (session token) setup methods - Displays current status of SDK and CLI availability - Shows authentication state for each method - Helps users understand they have two options for 1Password integration
1 parent c220ca5 commit 8dd6a4a

1 file changed

Lines changed: 61 additions & 20 deletions

File tree

internal/secrets/onepassword_sdk.go

Lines changed: 61 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,17 @@ func (p *OnePasswordSDKProvider) IsAuthenticated() bool {
191191

192192
// GetAuthenticationInstructions returns instructions for authenticating with 1Password SDK
193193
func (p *OnePasswordSDKProvider) GetAuthenticationInstructions() string {
194+
// Check if CLI is available as fallback
195+
cliAvailable := p.cliProvider != nil && p.cliProvider.IsEnabled()
196+
cliAuthenticated := cliAvailable && p.cliProvider.IsAuthenticated()
197+
198+
baseInstructions := ""
194199
if p.accountName == "" {
195-
return `MremoteGO needs to connect to your 1Password desktop app.
200+
baseInstructions = `MremoteGO supports two ways to connect to 1Password:
201+
202+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
196203
197-
✅ SETUP INSTRUCTIONS:
204+
🔷 OPTION 1: Desktop App (Recommended - Biometric Auth)
198205
199206
1. Install the 1Password desktop app (BETA version required)
200207
Download from: https://releases.1password.com/
@@ -206,24 +213,31 @@ func (p *OnePasswordSDKProvider) GetAuthenticationInstructions() string {
206213
• Turn on "Integrate with the 1Password SDKs"
207214
• Turn on "Integrate with other apps"
208215
209-
4. Note your account name:
210-
• Look at the top of the sidebar in 1Password
211-
• Example: "My Personal Account" or "work.1password.com"
216+
4. In your config.yaml, set:
217+
settings:
218+
onePasswordAccount: "Your Account Name"
219+
(Find this at the top of the 1Password sidebar)
212220
213-
5. Restart MremoteGO and unlock 1Password with biometrics!
221+
5. Restart MremoteGO and unlock with biometrics!
214222
215-
🔐 Once enabled, MremoteGO will prompt for biometric authentication
216-
when accessing passwords - just like unlocking 1Password itself!
223+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
217224
218-
────────────────────────────────────────────────────
225+
� OPTION 2: CLI (Fallback - Session Token)
219226
220-
Note: This uses the 1Password SDK BETA feature for desktop app integration.
221-
Session lasts 10 minutes and auto-expires for security.`
222-
}
227+
1. Install 1Password CLI:
228+
https://developer.1password.com/docs/cli/get-started/
229+
230+
2. Sign in:
231+
op signin
232+
233+
3. Launch MremoteGO from the same terminal
234+
(Inherits your session token automatically)`
235+
} else {
236+
baseInstructions = fmt.Sprintf(`MremoteGO supports two ways to connect to 1Password:
223237
224-
return fmt.Sprintf(`MremoteGO needs to connect to your 1Password desktop app.
238+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
225239
226-
✅ SETUP INSTRUCTIONS:
240+
🔷 OPTION 1: Desktop App (Configured: %s)
227241
228242
1. Install the 1Password desktop app (BETA version required)
229243
Download from: https://releases.1password.com/
@@ -235,15 +249,42 @@ Note: This uses the 1Password SDK BETA feature for desktop app integration.
235249
• Turn on "Integrate with the 1Password SDKs"
236250
• Turn on "Integrate with other apps"
237251
238-
4. Restart MremoteGO and unlock 1Password with biometrics!
252+
4. Restart MremoteGO and unlock with biometrics!
239253
240-
🔐 Once enabled, MremoteGO will prompt for biometric authentication
241-
when accessing passwords - just like unlocking 1Password itself!
254+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
242255
243-
────────────────────────────────────────────────────
256+
� OPTION 2: CLI (Fallback - Session Token)
244257
245-
Note: This uses the 1Password SDK BETA feature for desktop app integration.
246-
Session lasts 10 minutes and auto-expires for security.`, p.accountName)
258+
1. Install 1Password CLI:
259+
https://developer.1password.com/docs/cli/get-started/
260+
261+
2. Sign in:
262+
op signin
263+
264+
3. Launch MremoteGO from the same terminal
265+
(Inherits your session token automatically)`, p.accountName, p.accountName)
266+
}
267+
268+
// Add status information
269+
statusInfo := "\n\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n📊 Current Status:\n"
270+
271+
if p.enabled {
272+
statusInfo += " ✅ SDK: Connected (using desktop app)\n"
273+
} else {
274+
statusInfo += " ❌ SDK: Not available\n"
275+
}
276+
277+
if cliAvailable {
278+
if cliAuthenticated {
279+
statusInfo += " ✅ CLI: Available and authenticated\n"
280+
} else {
281+
statusInfo += " ⚠️ CLI: Available but not authenticated (run 'op signin')\n"
282+
}
283+
} else {
284+
statusInfo += " ❌ CLI: Not installed\n"
285+
}
286+
287+
return baseInstructions + statusInfo
247288
}
248289

249290
// IsReference checks if a string is a 1Password reference (starts with op://)

0 commit comments

Comments
 (0)