Angular Vietnam Presentation Overview

Aug 22, 2024

Angular Vietnam Presentation Notes

Welcome to the first Angular Vietnam presentation in English

  • Speaker introduces themselves
  • The presentation will cover:
    • Authentication
    • Authorization
    • Introduction to TNC Scully (personal blog)
    • Miscellaneous topics and Q&A

Authentication

  • Definition: Authentication verifies who the user is
  • JWT (JSON Web Tokens):
    • Focus on JWT-based authentication
    • Discusses local storage vs. cookies for storing tokens
    • JWT typically has two tokens:
      • Access Token:
        • Used to access data
        • Short expiration time (5 mins to 1 hour)
      • Refresh Token:
        • Used to obtain a new access token
        • Longer expiration time (days to weeks)

Token Storage

  • Access tokens stored in memory (temporary storage)
  • Refresh tokens stored in cookies (more secure)

Token Flow

  1. User logs in, receives both tokens
  2. Store access token in memory, refresh token in cookies
  3. On token expiration, use refresh token to obtain a new access token

Authorization

  • Definition: Authorization checks what the user can do
  • Distinction between authenticated but not authorized users
  • Discusses permission handling using binary flags (1, 2, 4, 8) for CRUD operations
  • Can use binary operations to efficiently check user permissions

TNC Scully

  • Personal blog details: narc.me
  • Built with Angular and Scully (static site generator for Angular)
  • Benefits of using Scully:
    • Improved SEO
    • Performance optimization
  • Configuration process with Scully
  • Live preview of changes using service workers

Theme Toggling

  • Setup of light and dark themes using CSS variables
  • Use of Angular Renderer to manage theme changes
  • Automatic updates and caching using service workers

Q&A Session

  • Open floor for questions
  • Discusses various aspects of Angular, authentication, and authorization practices
  • Mentions future topics: OAuth 2.0, security practices

Conclusion

  • Speaker wraps up the presentation
  • Encourages audience participation and feedback
  • Announcements about future sessions and topics
  • Thanks the audience for attending.