File tree Expand file tree Collapse file tree
server/src/main/java/dev/findfirst/users/controller Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,11 +105,12 @@ public ResponseEntity<List<Oauth2Source>> oauth2Providers() {
105105 // do we really want to trust anything that isn't https?
106106 return ;
107107 }
108- var domain = noProto .indexOf ("/" );
109- var faviconURI = "https://" + noProto .substring (0 , domain ) + "/favicon.ico" ;
110-
108+ var favDomain = noProto .indexOf ("/" );
109+ var faviconURI = "https://" + noProto .substring (0 , favDomain ) + "/favicon.ico" ;
110+ var registrationId = provider . getRegistrationId ();
111111 log .debug ("Favicon URI {}" , faviconURI );
112- listOfAuth2Providers .add (new Oauth2Source (provider .getClientName (), faviconURI ));
112+ listOfAuth2Providers .add (new Oauth2Source (provider .getClientName (), faviconURI ,
113+ "oauth2/authorization/" + registrationId ));
113114 });
114115 return ResponseEntity .ofNullable (listOfAuth2Providers );
115116 }
@@ -215,7 +216,8 @@ public ResponseEntity<String> refreshToken(
215216 public ResponseEntity <String > uploadProfilePicture (
216217 @ Valid @ RequestParam ("file" ) @ FileSize MultipartFile file ) throws NoUserFoundException {
217218 log .debug ("Attempting to add user profile picture" );
218- User user = userService .getUserById (uContext .getUserId ()).orElseThrow (NoUserFoundException ::new );
219+ User user =
220+ userService .getUserById (uContext .getUserId ()).orElseThrow (NoUserFoundException ::new );
219221
220222 // File type validation
221223 String contentType = file .getContentType ();
You can’t perform that action at this time.
0 commit comments