upgrade shopify OAuth process

master
ycfxx 3 years ago
parent a8bc6dfc62
commit 720f6868da

@ -67,7 +67,7 @@ public class ShopifyAuthTemplateController {
* @return
*/
@GetMapping("/auth/back")
public RedirectView shopifyStoreAuthRedirect(@RequestParam("code") String code,
public String shopifyStoreAuthRedirect(@RequestParam("code") String code,
@RequestParam("hmac") String hmac,
@RequestParam("host") String host,
@RequestParam("state") String state,
@ -98,7 +98,7 @@ public class ShopifyAuthTemplateController {
String redirectUri = PlatformEnvironment.getEnv().concatUrl("/auth.html#/shopify/login?code=" + code + "&hmac=" + hmac + "&host=" + host + "&state=" + state + "&shop=" + shop + "&timestamp=" + timestamp);
response.setHeader("content-security-policy", "frame-ancestors https://" + shop + ".myshopify.com https://admin.shopify.com");
return new RedirectView(redirectUri);
return "redirect:" + redirectUri;
}
}

@ -73,7 +73,7 @@ spring:
app:
run-tasks: false
host:
main: https://1c6d-222-95-180-118.ngrok.io/
main: https://65e5-222-95-183-204.ngrok.io/
regions:
au: http://dalong-au.dev.rpaygroup.com/
cn: http://dalong-au.dev.rpaygroup.com/

@ -2,6 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Security-Policy" content="frame-ancestors 'none'">
<title>Auth</title>
<link rel="stylesheet" type="text/css" href="/static/lib/bootstrap/css/bootstrap.min.css">
<script type="text/javascript" src="/static/lib/jquery/jquery-2.1.4.min.js"></script>

@ -2,6 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Security-Policy" content="frame-ancestors 'none'">
<title>Title</title>
<style>

@ -2,6 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Security-Policy" content="frame-ancestors 'none'">
<title>Title</title>
<style>

@ -2,6 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Security-Policy" content="frame-ancestors 'none'">
<title>Title</title>
<style>

@ -2,6 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Security-Policy" content="frame-ancestors 'none'">
<title>Title</title>
<style>
.col-centered {

Loading…
Cancel
Save