Skip to content

Commit b9155cc

Browse files
authored
refactor: use native a tag (#10)
1 parent fa27cd9 commit b9155cc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

logto-sample/app/views/sample/index.html.erb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
<p>Is authenticated: <%= @client.is_authenticated? %></p>
44

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

0 commit comments

Comments
 (0)