jwt_decode_token 1.0.0 copy "jwt_decode_token: ^1.0.0" to clipboard
jwt_decode_token: ^1.0.0 copied to clipboard

A starting point for Dart libraries or applications.

example/jwt_decode_token_example.dart

import 'package:jwt_decode_token/jwt_decode_token.dart';

void main() {
  var token = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjoiMSIsInVzZXJuYW1lIjoiZGFydHNvY2lldHkiLCJlbWFpbCI6ImhlbGxvQGRhcnRzb2NpZXR5LmRldiJ9LCJpYXQiOjE1ODc3NzIyMTUsImV4cCI6MTU5MDM2NDIxNX0.ixXHGIxVXsbhkV5fUO11RG84cxebOlVVjrBa7rkcUXY';
  var payload = decodeJwt(token);

  print(payload);
  // --> {user: {id: 1, username: dartsociety, email: hello@dartsociety.dev}, iat: 1587772215, exp: 1590364215}
}