API to get pod given user email

To make it easy for logging in, in my prospective iOS app, I need a way to get the pod given user email. Currently the only way, is the ask every single active pod if they has this user or not.

The solution is to ask the user for their diaspora-id for logging, not their email address. You don’t need their email address anyway, since you can’t use that to login, only usernames.

Even if there would be a central user address book which you could use to lookup email addresses, it would be optional, so it never will be a reliable solution for any kind of apps.

what about user id, like if I ask pod.thomas.de to authorize “fla” username, will it give error? How about if it points me instead to the right pod which is e.g. diaspora.fr.org ?

It’s not pod.thomas.de responsibility to know where fla is registred. And it cannot know. Usernames are not unique in the network. This is why Fla’s diaspora-id is fla@diaspora-fr.org, and not fla. When you ask for user credentials in your app, once again, you ask for the diaspora id. Not for the username. Not for anything else. And so you have no reason to guess what pod the user is on.

@amraboelela what Dennis said. Email address is optional in diaspora*. And the user id is not just fla, it is fla@diaspora-fr.org. I do even have other accounts on other pods, so fla definitely is not unique.

You have to think about diaspora* the same way you think about emails. If you were building an e-mails app to read and write e-mails, you would ask for the e-mail address of the user, for example amr@gmail.com. You wouldn’t think to ask only for amr, nor to ask to yahoo.com where amr is registered, waiting for it to answer amr@gmail.com. Do you see what I mean?

In my iOS app I want to simplify the sign-in experience. So if user don’t remember the pod name but remember his username. I would like to have an automatic way for the user to find his pod. Currently the only way I think of, is to ask every active pod to sign-in with that ID until I am successful or until I get password is wrong error.

Then too bad. If you remember that your email address starts with “john” but you don’t remember the domain, then that’s it. You’re goofed. Same with diaspora.

If you do that, I will personally yell at you and spam you with photos of angry cats. And I am not even kidding. Everything about this idea is wrong and I can’t even express how bad it is without using words that can be read as a personal insult. Do not do that. Ever.

If the user is not able to remember their full username (which includes the account name, an at character, and a hostname), then they simply lost access to their account. Randomly trying to login with a username only on random pods is horrible. It is flawed by design, it will never work, and it will annoy a lot of people.

1 Like

in https://podupti.me/api.php?key=4r45tg&format=json&method=jsonp&callback=Test1234JsonPPP

some pods say “hidden”=“true” does that mean I shouldn’t show them in the list, where the user can chose from?

The hidden pods are probably the one with a low score, because they have a bad uptime and/or are very old and not maintained anymore.

However, as @denschub already mentioned, the easiest way is still when the users just enter their full diaspora ID and you know the pod from it, they don’t need to choose from a list.