You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The client will use the web application flow to connect with github. This provides the client with a code parameter, which it posts to the server.
We should add a POST /github_connect route and an action in the UserController which receives the code, calls a function to handle the API side of the flow, then signs in (to refresh) and renders the current user.
The module which gets called, if not yet implemented as part of another issue, can be temporarily defined under /lib/codecorps/github.ex. If not yet implemented, the function should be temporarily written as:
defmoduleCodeCorps.GitHubdo@doc""" Temporary function until the actual behavior is implemented. """defconnect(user,_code),do: userend
The github connect action requires authentication.
It calls Guardian.Plug.current_resource to retrieve the current user, then sends it, alongside the code parameter into the CodeCorps.GitHub.connect function. It receives back an {:ok, user} which can just be sent outwards, to be handled by ja_resource.
Subtasks
Add the POST /github_connect route
Add the UserController.github_connect/2 action. It
Add a user controller test for this action.
The text was updated successfully, but these errors were encountered:
Problem
The client will use the web application flow to connect with github. This provides the client with a
code
parameter, which it posts to the server.We should add a
POST /github_connect
route and an action in theUserController
which receives the code, calls a function to handle the API side of the flow, then signs in (to refresh) and renders the current user.The module which gets called, if not yet implemented as part of another issue, can be temporarily defined under
/lib/codecorps/github.ex
. If not yet implemented, the function should be temporarily written as:The github connect action requires authentication.
It calls
Guardian.Plug.current_resource
to retrieve the current user, then sends it, alongside thecode
parameter into theCodeCorps.GitHub.connect
function. It receives back an{:ok, user}
which can just be sent outwards, to be handled byja_resource
.Subtasks
POST /github_connect
routeUserController.github_connect/2
action. ItThe text was updated successfully, but these errors were encountered: