Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
$.ajax({
  url: "/user/api:signedUser",
  success: function(reply) { 
      alertconsole.log(reply.username) 
  },
  xhrFields: {
      withCredentials: true
  }
});

As a result, the current user's username will be displayed in the console.

Image Added