MHLOGIN(1)

πŸ’– MHLOGIN(1) β€” the manual, but make it a group chat πŸ’–

mhlogin is the nmh girlie that logs you into external (OAuth) services. Bestie, she's a General Commands Manual icon and I'm obsessed. ✨


πŸŽ€ NAME πŸŽ€

mhlogin β€” nmh login to external (OAuth) services


✨ SYNOPSIS ✨

🚨 okay so real talk first: this implementation is no longer supported but is left here for information. Why? Because Google now only supports POP except with a private client ID. Also, it no longer supports OOB requests to Google's OAuth 2.0 authorization endpoint. So like… it's giving historical artifact, bestie. πŸ’€
mhlogin [-help] [-version] [-user username] [-saslmech mechanism]
     [-authservice service] [-browser command] [-snoop]

🌸 DESCRIPTION 🌸

mhlogin currently only supports OAuth for Gmail, no cap. Run:

mhlogin -user username -saslmech xoauth2 -authservice gmail

and then load the printed URL in your browser. πŸ¦‹ Login to a Gmail account, grant authorization, and copy and paste the code into the mhlogin prompt. Be sure to use the same account with the -user switch to send β€” literally, do not fumble that part. πŸ™ˆ See the EXAMPLES section below for an example.

The -browser switch causes mhlogin to load the URL directly into a new browser session. The command argument must include the browser invocation name, and can include any browser arguments in the -browser argument string, e.g., 'google-chrome --new-window'. Slay. πŸ’…

The -snoop switch can be used to view the HTTP transaction. πŸ‘€

All parameters configuring the service may be overridden by profile components, and even though only Gmail is supported out of the box, the user can define new services entirely in the profile. Profile components are prefixed by oauth-service-, for example, oauth-gmail-credential-file which specifies where mhlogin should write credentials and where send should read them. The way that's configurable? Iconic. πŸ‘‘


πŸ’– EXAMPLES πŸ’–

πŸ“ Gmail

First, login to the Gmail account that you want to use, e.g, user@example.com, using a web browser. 🌈 Then, enter a mhlogin command such as:

mhlogin -user user@example.com -saslmech xoauth2 -authservice gmail -browser 'google-chrome --new-window'

The username should be a complete email address. Respond to the prompt in the browser window, then copy and paste the authorization code in response to the mhlogin prompt. 🫢


πŸ‘‘ PROFILE COMPONENTS πŸ‘‘


πŸ¦‹ SEE ALSO πŸ¦‹


⭐ DEFAULTS ⭐

  • -saslmech β€” xoauth2

And that's the whole page, bestie β€” no notes. πŸ’œ This little time capsule is from nmh-1.8, dated 2016-10-10, and it lives at MHLOGIN(1). Take care of her, she's retired. πŸŽ€βœ¨