I am using google api with spring oauth2 dependency. I have my springboot project loading my react script, but how do i incorporate the OAuth2AuthenticationToken.
package com.logic.springbootwithreact.controllers;
import org.springframework.security.oauth2.client.authentication.OAuth2AuthenticationToken;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
//@Controller
@RestController
@CrossOrigin
public class ClientForwardController {
@GetMapping(value = "/**/{path:[^\\.]*")
public String forward(OAuth2AuthenticationToken oAuth2AuthenticationToken) {
return "forward:/";
}
}
has anyone done a similar project with the frontend-maven-plugin and oauth2 and know the way to make your controller and what to code into the App.js
I have tried running the springboot application and called localhost:8080 and got the react page loading, but i first want to go through the google oauth2 process.