Skip to content

Commit

Permalink
refactor: use native a tag
Browse files Browse the repository at this point in the history
  • Loading branch information
gao-sun committed Jun 13, 2024
1 parent fa27cd9 commit 7931800
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions logto-sample/app/views/sample/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
<p>Is authenticated: <%= @client.is_authenticated? %></p>

<% if @client.is_authenticated? %>
<%= link_to "Sign out", sign_out_path %>
<a href="<%= sign_out_path %>">Sign out</a>
<p>Welcome, <%= @client.id_token_claims["username"] %></p>
<p>Userinfo: <%= @client.fetch_user_info %></p>
<!-- Uncomment the following line to fetch the access token claims for a resource -->
<!-- <p>Resource access token: <%# @client.access_token_claims(resource: "https://shopping.api/") %></p> -->
<% else %>
<%= link_to "Sign in", sign_in_path %>
<a href="<%= sign_in_path %>">Sign in</a>
<% end %>

0 comments on commit 7931800

Please sign in to comment.