Run yarn build
to build the project.
Run yarn test
to execute the unit tests via [Karma].
To change FALLBACK URI:
{
provide: FALLBACK_PAGE_URI,
useValue: 'your path'
}
To use your custom auth service:
{
provide: AUTH_SERVICE,
deps: [ YourService ],
useFactory: factory
}
Token based auth in header. Example:
"Authorization: Bearer ACCESS_TOKEN"
POST
/api/facebook/session
{
"access_token": string
}
Responses:
POST
/api/gooogle_plus/session
{
"access_token": string
}
Responses:
POST
/api/linked_in/session
{
"access_token": string
}
Responses:
POST
/api/twitter/session
{
"access_token": string
}
Responses:
POST
/api/instagram/session
{
"access_token": string
}
Responses:
POST
/api/pinterest/session
{
"access_token": string
}
Responses:
POST
/api/session
{
"session": {
"email": string,
"password": string,
"password_confirmation": string,
}
}
Responses:
POST
/api/profile
{
"profile": {
"email": string,
"first_name": string, // required
"last_name": string, // required
"password": string, // required
"password_confirmation": string, // required
}
}
Responses:
PUT
/PATCH
/api/profile
{
"profile": {
"first_name": string,
"last_name": string,
}
}
Responses:
POST
/api/password_change
{
"password_change": {
"password": string,
"new_password": string,
"new_password_confirmation": string,
}
}
Responses:
- 200
- 401
- 422 Errors
DELETE
/api/session
Responses:
- 200
- 401
POST
/api/restore_password
{
"restore_password": {
"email": string,
"path": string
}
}
Response:
- 200
- 404
GET
/api/restore_passwords/:token
Response:
- 200
- 404
POST
/api/reset_password
{
"reset_password": {
"token": string,
"password": string,
"password_confirmation": string
}
}
Responses:
- 200
- 404
- 422 Errors
{
"errors": {
"base": string[] // everything that doesn't belong to `form`
"email": string[],
"password_confirmation": string[]
}
}
{
"id": number,
"role": string,
"email": string,
"phone": string,
"banned": boolean,
"first_name": string,
"last_name": string,
"avatar_url": string,
"status": "completed" | "incompleted",
}
{
"token": string,
"user": [User](#usermodel)
}