README.md

Nextcloud Single Sign On

This library allows you to use accounts as well as the network stack provided by the nextcloud files app. Therefore you as a developer don’t need to worry about asking the user for credentials as well as you don’t need to worry about self-signed ssl certificates, two factor authentication, save credential storage etc.

Please note that the user needs to install the nextcloud files app in order to use those features. While this might seem like a “no-go” for some developers, we still think that using this library is worth consideration as it makes the account handling much faster and safer.

// If you stored the "default" account using setCurrentAccount(...) you can get the account by using the following line:
SingleSignOnAccount ssoAccount = SingleAccountHelper.getCurrentSingleSignOnAccount(context);
// Otherwise (for multi-account support): (you'll have to keep track of the account names yourself. Note: this has to be the name of SingleSignOnAccount.name)
AccountImporter.getSingleSignOnAccount(context, accountName);
// ssoAccount.name // Name of the account used in the android account manager
// ssoAccount.username
// ssoAccount.token
// ssoAccount.url

Nextcloud Conference 2018 Talk (5min)

Video

Examples

Flow Diagram

Note that the “Make network request” section in the diagram only shows the workflow if you use the “retrofit” api.

Translations

We manage translations via Transifex. So just request joining the translation team for Android on the site and start translating. All translations will then be automatically pushed to this repository, there is no need for any pull request for translations.