[RSO] set access-control-allow-origin res header - #396
Open
luoh00 wants to merge 13 commits into
Open
Conversation
Created /rso/oauth in auth.js which takes in access code in its URL as a query string and exchanges this code for tokens using fetch to Riot's /token endpoint. Verified this worked using Postman.
Added button inside Header.tsx that redirects user to /rso/signin endpoint. Modified /rso/signin to redirect to link instead of returning a Sign In button that would redirect to Riot sign in page.
Created an endpoint in auth.js that will fetch a GET to Riot's /account endpoint to know who logged in using RSO and get the player's userid, player tag, and player name.
Finished /rso/getUserInfo route so that it takes an access token in the params and fetches to Riot's /accounts/v1/me endpoint to get player username, tagline, and uuid. Added functionality to Header.tsx to show the user's username and tagline if they logged in via RSO.
Added null checks to leaderboard.tsx component and leaderboard endpoint.
Added a header to the response of /rso/oauth to hopefully solve problem on prod where fetch to /rso/oauth with the code times out.
Kagiri2
approved these changes
Nov 13, 2024
Added Riot puuid, IGN, tagline, RSO access and refresh tokens to the top level AuthContext in App.tsx. Relocated fetch to /rso/getUserInfo endpoint to App.tsx's useEffect instead of leaving it in Header.tsx since otherwise Header.tsx would continuously refetch to get user info.
Added a RiotProfile.tsx component and began creating a skeleton for it. In the future this can be used to display Valorant stats that signed in with RSO similar to tracker.gg.
Created new endpoint getPuuid to get the correct puuid for a Riot account. This is needed because when using the puuid returned from the getUserInfo endpoint for any Riot API that uses the puuid as part of the url param, response returns an error saying couldn't decrypt the puuid. The new endpoint getPuuid should fix this by returning a usable puuid.
luoh00
force-pushed
the
haoking/test
branch
2 times, most recently
from
December 6, 2024 19:37
5f6ffba to
ca16270
Compare
Began implementation of how to fetch to Riot endpoint to retrieve array of recent match ids of a player that logged in via RSO.
src/web/src/App.tsx src/web/src/Components/global/Header.tsx src/web/src/Pages/user/RiotProfile.tsx
|
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
hopefully this fixes prod