Skip to content

Commit 102e1da

Browse files
committed
Fix OAuth login CORS issue by using GET request instead of POST
1 parent eea9f61 commit 102e1da

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/views/layouts/application.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@
5252
<%= button_to "Logout", logout_path, method: :delete,
5353
class: "inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors" %>
5454
<% else %>
55-
<%= button_to "Login with GitHub", "/auth/github", method: :post,
56-
data: { turbo: false },
57-
class: "inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md text-white bg-gray-900 hover:bg-gray-800 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-500 transition-colors" %>
55+
<%= link_to "Login with GitHub", "/auth/github",
56+
data: { turbo: false },
57+
class: "inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md text-white bg-gray-900 hover:bg-gray-800 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-500 transition-colors" %>
5858
<% end %>
5959
</div>
6060
</div>

0 commit comments

Comments
 (0)