Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- await this.$auth.login({
- data: {
- email: this.email,
- password: this.password
- }
- }).then(() => {
- this.$router.push('/dashboard')
- }).catch(err => {
- this.snackbar.show = true;
- })
- auth: {
- strategies: {
- local: {
- endpoints: {
- login: {
- url: '/auth/login',
- method: 'post',
- propertyName: 'access_token'
- },
- logout: {
- url: '/auth/logout',
- method: 'post'
- },
- user: {
- url: '/auth/me',
- method: 'post'
- },
- tokenRequired: true
- }
- }
- }
- }
- {
- "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvYXBpLmFwcHJleC5kZVwvYXBpXC9hdXRoXC9sb2dpbiIsImlhdCI6MTUzODI5NTczMywiZXhwIjoxNTM4Mjk5MzMzLCJuYmYiOjE1MzgyOTU3MzMsImp0aSI6ImdtWWVyZTViQjk1cU5BRG8iLCJzdWIiOjIsInBydiI6IjYwODM2NzQ0MzQ4ZDQzMTk4NzE4N2ZjMWM2YzIzMjYxMDcyMWE5ZjAifQ.JhOiwIg7StzZR71aqYyI9rJpPXVclmddzPSIwqCIUN4",
- "token_type": "bearer",
- "expires_in": 3600
- }
- {
- "id": 2,
- "name": "Dominik Dummy",
- "email": "dummy@andreas-pabst.de",
- "created_at": {
- "date": "2018-09-28 09:11:31.000000",
- "timezone_type": 3,
- "timezone": "UTC"
- },
- "updated_at": {
- "date": "2018-09-28 09:11:31.000000",
- "timezone_type": 3,
- "timezone": "UTC"
- },
- "self": "https://api.apprex.de/api/users/2"
- }
Add Comment
Please, Sign In to add comment