upgrade shopify OAuth process

master
ycfxx 4 years ago
parent a8bc6dfc62
commit 720f6868da

@ -67,7 +67,7 @@ public class ShopifyAuthTemplateController {
* @return * @return
*/ */
@GetMapping("/auth/back") @GetMapping("/auth/back")
public RedirectView shopifyStoreAuthRedirect(@RequestParam("code") String code, public String shopifyStoreAuthRedirect(@RequestParam("code") String code,
@RequestParam("hmac") String hmac, @RequestParam("hmac") String hmac,
@RequestParam("host") String host, @RequestParam("host") String host,
@RequestParam("state") String state, @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); 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"); 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: app:
run-tasks: false run-tasks: false
host: host:
main: https://1c6d-222-95-180-118.ngrok.io/ main: https://65e5-222-95-183-204.ngrok.io/
regions: regions:
au: http://dalong-au.dev.rpaygroup.com/ au: http://dalong-au.dev.rpaygroup.com/
cn: http://dalong-au.dev.rpaygroup.com/ cn: http://dalong-au.dev.rpaygroup.com/

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

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

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

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

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

Loading…
Cancel
Save