Comments (3)
All endpoints the client interacts with have to be OCS endpoints.
But that is easy too, see https://github.com/nextcloud/notifications/blob/master/lib/Controller/EndpointController.php#L36 for example code
from registration.
Would it make sense to reconsider the flow?
I do agree that admin approval might be important. But the greater goal for me would be to have a signup flow a la dropbox:
So this would be the API:
POST /.well-known/nextcloud/registration
- name
- username
- password
And then as a provider, I could redirect it to another backend like:
https://github.com/jedireza/aqua/blob/master/server/api/signup.js#L33-L36
(If I want ldap signup for instance)
And then in term of flow, we could still do the following a posteriori:
- require email verification yes/no
- require admin approval
- require email domain name
- require payment
And depending on these options, the server could return a response showed to the client.
- "Waiting email confirmation"
- "Waiting admin approval"
- 403 - "You email is not authorized"
- 402 - "Please pay here to proceed"
I know it would require some changes to the current app. But in term of UX, this would be optimal IMHO.
from registration.
I'll be working on implementing a provider list and optional registration feature on the Nextcloud client during this years google summer of code, so I'm willing to implement such an API and especially use the existing registration app for that. @pellaeon Would you be open to pull requests for that?
@pierreozoux That draft makes sense, especially auto discovery via .well-known path would be nice.
I've summarized both of your ideas to this rough API draft:
POST /apps/registration/api/1.0/register/verify
Request Data:
{
username: 'username',
displayname: '',
email: 'email',
}
Responses:
200 Success
400 Request invalid (e.g. email/username already exists, invalid email)
POST /apps/registration/api/1.0/register/create
Request Data:
{
username: 'username',
displayname: '',
email: 'email',
password: '',
}
Response Data
200 Signup successfull
{
status: 'REQUIRE_EMAIL_CONFIRM',
statusMessage: 'Please confirm your email adress',
registrationToken': 'tokenToIdentifyRegistration',
}
GET /apps/registration/api/1.0/register/status/:registrationToken
Response Data
200 if registration status is FINISHED
{
status: 'FINISHED',
appPassword': 'unique-app-password',
}
403 if email confirmation is still required
{
status: 'REQUIRE_EMAIL_CONFIRM',
message: 'Please confirm your email adress'
}
As an initial starting point i would add two possible states to the registration status:
- REQUIRE_EMAIL_CONFIRM
- FINISHED
Those can of course be extended when admin approval or payment status features will be included in the app.
Overview of the client procedure:
- User wants to register
- User enters email, username, displayname
- Client checks against /verify
- User enters password
- Client sends request to /create
- Client checks if status is finished
- Client can setup an account using the submitted app password
cc @rullzer
from registration.
Related Issues (20)
- Implement a public "disposable" email addresses list as a simple ON/OFF switch
- Call to a member function getUserLanguage() on null
- feature: autoaccept some domains
- 🛠️ State of maintenance HOT 4
- Unable to set user email: This parser can only read from strings or streams. HOT 1
- 2.1 use 1.5 css ui HOT 1
- Activation of user not possible on mobile HOT 1
- Cannot assign approval for specific group HOT 1
- how to add more feilds HOT 1
- NC27 update
- Invalid username policy regex HOT 1
- Allow adding custom HTML to verification emails HOT 3
- Allow to add further information like your address during the verification process HOT 1
- Version for NC28 HOT 2
- An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'username' in 'field list' HOT 1
- Feature Request: Remove Registration link on Login Page HOT 11
- Register not working (worked previously) HOT 5
- Resend verification email
- Show "soft" email requirement instructions
- I have added a feature (for Issue: 621) to Registrations - But pull request keeps failing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from registration.