// GET: /<controller>/
        public IActionResult Index(string code, string state)
        {
            var token = AuthorizationCode.ProcessCallback(_spotifyAuthService.GetAuthParameters(), code);

            //// Use the api with access to personal data.
            _spotifyAuthService.SetToken(token);
            return(RedirectToAction("Index", "Admin"));
        }
Exemplo n.º 2
0
        public IActionResult FetchToken()
        {
            var url = AuthorizationCode.GetUrl(_spotifyAuthService.GetAuthParameters(), "");

            return(Redirect(url));
        }