mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 11:12:26 -05:00 
			
		
		
		
	[bugfix] Fix '+'-separated scopes not being recognized (#4028)
* [bugfix] Fix '+'-separated scopes not being recognized * comment
This commit is contained in:
		
					parent
					
						
							
								d308fd0d0a
							
						
					
				
			
			
				commit
				
					
						e9f6d186dc
					
				
			
		
					 6 changed files with 35 additions and 19 deletions
				
			
		|  | @ -107,12 +107,15 @@ const extended = gtsApi.injectEndpoints({ | |||
| 				const instanceUrl = state.login.instanceUrl; | ||||
| 
 | ||||
| 				// Parse instance URL + set params on it.
 | ||||
| 				//
 | ||||
| 				// Note that any space-separated scopes are
 | ||||
| 				// replaced by '+'-separated, to fit the API.
 | ||||
| 				const url = new URL(instanceUrl); | ||||
| 				url.pathname = "/oauth/authorize"; | ||||
| 				url.searchParams.set("client_id", app.client_id); | ||||
| 				url.searchParams.set("redirect_uri", redirectURI); | ||||
| 				url.searchParams.set("response_type", "code"); | ||||
| 				url.searchParams.set("scope", scope); | ||||
| 				url.searchParams.set("scope", scope.replace(" ", "+")); | ||||
| 
 | ||||
| 				// Set the app ID in state so we know which
 | ||||
| 				// app to get out of our store after redirect.
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue