Skip to content

Commit da25b8e

Browse files
authored
Merge branch 'master' into fix_order_shipping_address
2 parents 3d1ea7a + d59d0da commit da25b8e

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

.travis.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
language: ruby
22
rvm:
33
- ruby-head
4-
- 2.0
5-
- 2.1
6-
- 2.2
7-
- 2.3
8-
- 2.4
4+
- 2.6
5+
- 2.7
6+
- 3.0
97
cache:
108
bundler: true
119
sudo: false

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2017-present, BigCommerce Pty. Ltd. All rights reserved
1+
Copyright (c) 2019-present, BigCommerce Pty. Ltd. All rights reserved
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
44
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the

lib/bigcommerce/resources/customers/customer.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,18 @@ def self.count(params = {})
3434
# Generate a token that can be used to log the customer into the storefront.
3535
# This requires your app to have the store_v2_customers_login scope and to
3636
# be installed in the store.
37-
def login_token(config: Bigcommerce.config)
37+
def login_token(config: Bigcommerce.config, redirect_to: '/')
3838
payload = {
3939
'iss' => config.client_id,
4040
'iat' => Time.now.to_i,
4141
'jti' => SecureRandom.uuid,
4242
'operation' => 'customer_login',
4343
'store_hash' => config.store_hash,
44-
'customer_id' => id
44+
'customer_id' => id,
45+
'redirect_to' => redirect_to
4546
}
4647

47-
JWT.encode(payload, config.client_secret, 'HS256')
48+
JWT.encode(payload, config.client_secret, 'HS256', { typ: 'JWT' })
4849
end
4950
end
5051
end

0 commit comments

Comments
 (0)