Mobile sign-in via deep-linking?

Is it possible that member sign-in could work with a mobile app?
I work on a mobile app that fetches and displays articles.
How do members sign-in on this mobile app?
The sign-in email goes directly to ghost.
Is there a way to change this sign-in link so that it works with a deep-link to a mobile app that handles sign-in?

Any help appreciated!

The sign-in link sending is baked into Ghost and happens when there’s a request to the send_magic_link endpoint. But you can also create members and get a sign in link via the Admin API. **

I guess the question is, how do members using your app prove who they are, prior to getting logged in? You might think about doing OAuth with some provider. Sign in with Google probably won’t work in your app, but Facebook, Amazon, LinkedIn, Github, and others are fairly straightforward.

** An admin API key cannot go into the app, for risk of exposure. You’ll need a server or cloud function somewhere that keeps your key safe. I’m sure you know this, but just in case…

(edit: fixed a typo)

…get a sign in link via the Admin API. **

Thanks for the quick reply!
However, I’ve looked at the documentation. I apparently am missing something obvious. Can you please point me to the documentation that explains how to get a sign in link via the admin API for members (not users)?

My best tip for dealing with the api is always to do the action from the Ghost admin panel and see what it does, keeping the browser’s network tab open. In this case, you’re looking for the ‘impersonation’ link in the gear on an individual member’s page. You can hit that same endpoint with an admin jwt (made using an admin api key), getting a signin_url that you can use to get the user logged in with a cookie.

Source: I made that possible: Sign-in changes are afoot

And no, you probably aren’t missing anything obvious. There are a number of undocumented endpoints.

1 Like