Skip to content

In this article, you will learn how to build a modern, single-page frontend application in Rust using the Yew.rs framework and WebAssembly.

Notifications You must be signed in to change notification settings

wpcodevo/rust-yew-rs256-web-app

Repository files navigation

Rust and Yew.rs Frontend: JWT Access and Refresh Tokens

In this article, you will learn how to build a modern, single-page frontend application in Rust using the Yew.rs framework and WebAssembly. Our app will include essential JWT authentication features such as user registration, login, logout, restrict access to protected pages, and the ability to refresh access tokens in the background when they expire.

Rust and Yew.rs Frontend: JWT Access and Refresh Tokens

Topics Covered

  • Run the Yew.rs Frontend App Locally
  • Run the Frontend App with a Backend API
  • Bootstrap the Yew.rs Project
  • Setup Tailwind CSS
  • Define the API Request Functions
    • API Response Types
    • Create the API Requests
  • State Management with the Yewdux Library
  • Create Reusable Yew.rs Components
    • Create a Spinner Component
    • Create a Loading Button Component
    • Create a Notification Toast Component
    • Create a Form Input Component
    • Create a Header Component
    • Export the Components
  • Implement the Authentication Flow
    • Account Registration Component
    • Account Login Component
    • Add Logout Logic to the Header Component
  • Create the Remaining Page Components
    • Home Page
    • Profile Page
    • Export the Page Components
  • Setup Routes For the Yew Components
  • Render the Yew Application in the Main File
  • Test the RS256 JWT Yew.rs Frontend App
    • Home Page
    • Create a New Account
    • Sign Into the Yew App
    • View Account Credentials

Read the entire article here: https://codevoweb.com/rust-yew-frontend-jwt-access-and-refresh-tokens/

About

In this article, you will learn how to build a modern, single-page frontend application in Rust using the Yew.rs framework and WebAssembly.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages