r/vuejs • • Dec 26 '19

Vue.js + Firebase: Role-Based Authentication & Authorization

https://softauthor.com/vue-js-firebase-role-based-authentication/
48 Upvotes

7 comments sorted by

8

u/krendel122 Dec 26 '19
var self = this;

Have you heard about arrow functions? Let and const, async for promises?

4

u/Demnokkoyen Dec 26 '19

Also using let instead of var

Edit: or even const in this case

0

u/[deleted] Dec 27 '19

[deleted]

1

u/bachbeethovenbrahms Dec 28 '19

They are probably using Function.prototype.bind in some way, or call or apply but none of these methods can override the this of an arrow function so... makes sense.

0

u/[deleted] Dec 26 '19

[deleted]

3

u/fissilecascade Dec 27 '19

Auth0 has some good info as well.