ville9257
11/23/2022, 2:33 PMrp_st
11/23/2022, 2:46 PMrp_st
11/23/2022, 2:47 PMville9257
11/23/2022, 3:13 PMrobschilder
12/27/2022, 1:44 PMrp_st
12/27/2022, 1:45 PMrobschilder
12/27/2022, 1:47 PMFor example, in case of Apple login, Apple gives you different client IDs for iOS login vs web & Android login (same client ID for web and Android).
It's a bit unclear of what I need to dorobschilder
12/27/2022, 1:48 PMauthorisationRedirect: {
params: {
redirect_uri: `${apiDomain}/auth/callback/apple`,
},
},
I will now try to add this and see if it then works on iOSrp_st
12/27/2022, 1:51 PMrobschilder
12/27/2022, 1:54 PMnkshah2
12/27/2022, 1:55 PMnkshah2
12/27/2022, 1:56 PMnkshah2
12/27/2022, 1:56 PMnkshah2
12/27/2022, 1:56 PMrobschilder
12/27/2022, 1:59 PMThirdPartyEmailPassword.getAuthorisationURLWithQueryParamsAndSetState({
providerId: thirdPartyId,
authorisationURL,
})
where the authorisationURL is a link to my ${my_domain}/api/auth/redirect?provider="apple"
on mobile.
This then triggers the Apple login accordingly, by asking for the face ID. However, once that's succesful, the backend of Supertokens doesn't know it has to go to my app I guessrobschilder
12/27/2022, 2:02 PMnkshah2
12/27/2022, 2:03 PMnkshah2
12/27/2022, 2:04 PMnkshah2
12/27/2022, 2:04 PMrobschilder
12/27/2022, 2:05 PMrobschilder
12/27/2022, 2:05 PMhttps://appleid.apple.com/auth/authorize?scope=email&response_mode=form_post&response_type=code&client_id=apple.client.gigplan.mobile.app&redirect_uri=https%A%F%Fclient.gigplan.app%Fapi%Fauth%Fcallback%Fapple&state=62a25ab25df7c66a10118
nkshah2
12/27/2022, 2:06 PMnkshah2
12/27/2022, 2:06 PMnkshah2
12/27/2022, 2:07 PMnkshah2
12/27/2022, 2:07 PMrobschilder
12/27/2022, 2:07 PMrobschilder
12/27/2022, 2:08 PMrobschilder
12/27/2022, 2:08 PMrobschilder
12/27/2022, 2:08 PMnkshah2
12/27/2022, 2:08 PMrobschilder
12/27/2022, 2:10 PMnkshah2
12/27/2022, 2:11 PMnkshah2
12/27/2022, 2:11 PMrobschilder
12/27/2022, 2:12 PMnkshah2
12/27/2022, 2:13 PMrobschilder
12/27/2022, 2:14 PMnkshah2
12/27/2022, 2:14 PMnkshah2
12/27/2022, 2:14 PMrobschilder
12/27/2022, 2:15 PMnkshah2
12/27/2022, 2:15 PMrobschilder
12/27/2022, 2:15 PMnkshah2
12/28/2022, 5:25 AMrobschilder
12/28/2022, 11:31 AMrobschilder
12/28/2022, 11:31 AMrp_st
12/28/2022, 11:32 AMrobschilder
12/28/2022, 11:32 AMnkshah2
12/28/2022, 11:32 AMrobschilder
12/28/2022, 11:32 AMrobschilder
12/28/2022, 11:33 AMnkshah2
12/28/2022, 11:33 AMrobschilder
12/28/2022, 11:33 AMnkshah2
12/28/2022, 11:34 AMnkshah2
12/28/2022, 11:37 AMrobschilder
12/28/2022, 11:40 AMrobschilder
12/28/2022, 11:40 AMrobschilder
12/28/2022, 11:40 AMnkshah2
12/28/2022, 11:40 AMnkshah2
12/28/2022, 11:40 AMrobschilder
12/28/2022, 11:41 AMrobschilder
12/28/2022, 11:41 AMrobschilder
12/28/2022, 11:41 AMrobschilder
12/28/2022, 11:41 AMnkshah2
12/28/2022, 11:41 AMrobschilder
12/28/2022, 12:02 PMsupertokens-web-js
and using the functions provided by Supertokens, actually my Google login also stopped working on Capacitor.
The desktop login is good, but the Google response misses the state, as seen here:
/auth/callback/google?state=63890d5d2442ef25a2290&code=4%2F0AWgavdcGRdl9KGP0JqXB9qUKjAR0KqoWFmvMkNsEtBxaETLsGcXEwJmLmqBd9yIDG-p-wg&scope=email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+openid&authuser=0&prompt=consent
/auth/callback/google?code=4/0AWgavdexWlI_EGbaqeNgWrR6QAMd4vmCZbeaKbB78YT8wzQ5ktT99P0ZhnrDlpKbVG6fDg
robschilder
12/28/2022, 9:08 PMnkshah2
12/29/2022, 6:10 AMrobschilder
12/29/2022, 8:53 AMrobschilder
12/29/2022, 10:08 AMnkshah2
12/29/2022, 10:09 AMrobschilder
12/29/2022, 10:09 AMrobschilder
12/29/2022, 10:50 AMnkshah2
12/29/2022, 11:07 AMrobschilder
12/30/2022, 1:30 PMrobschilder
01/03/2023, 7:36 AMnkshah2
01/03/2023, 7:49 AMrobschilder
01/03/2023, 3:54 PMnkshah2
01/04/2023, 9:26 AMrobschilder
01/04/2023, 10:39 AMrp_st
01/04/2023, 10:40 AMrobschilder
01/08/2023, 11:18 AMrobschilder
01/08/2023, 11:22 AMrobschilder
01/08/2023, 11:22 AMrp_st
01/08/2023, 11:37 AMrobschilder
01/08/2023, 12:08 PMrobschilder
01/08/2023, 12:08 PMrobschilder
01/08/2023, 12:08 PMrp_st
01/08/2023, 12:08 PMnkshah2
01/09/2023, 6:42 AMrobschilder
01/11/2023, 10:36 AMnkshah2
01/13/2023, 10:33 AMcode
was being added as a query param in the redirect api, there are other query params that are required to complete the flow.
Since I was making changes to test this out and to verify that it works I went ahead and made a pull request to make it easier: https://github.com/RobSchilderr/capacitor-supertokens-nextjs-turborepo/pull/1
Ive verified that Google login works fine with the changes but did not get a chance to test Apple login, let me know if you need help with that after merging this onerobschilder
01/13/2023, 10:40 AMrobschilder
01/13/2023, 4:49 PMrobschilder
01/13/2023, 4:50 PMnkshah2
01/13/2023, 4:51 PMrobschilder
01/17/2023, 9:03 AMnkshah2
01/17/2023, 9:04 AMrobschilder
01/18/2023, 3:58 PMnkshah2
01/18/2023, 4:06 PMrobschilder
01/20/2023, 11:27 AMmarchalb
01/24/2023, 3:29 PMrobschilder
01/24/2023, 3:29 PMrobschilder
01/24/2023, 3:30 PMcapacitor.config
is similar, if you set //for localhost, we need to set sameSite to strict, due to no https
cookieSameSite: !IS_IN_PRODUCTION_ENVIRONMENT ? 'strict' : 'none',
in the backendconfigrobschilder
01/24/2023, 3:31 PM<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsLocalNetworking</key>
<true/>
</dict>
in info.plist
for Apple for local testingmarchalb
01/24/2023, 3:33 PMmarchalb
01/24/2023, 3:33 PMrobschilder
01/24/2023, 3:33 PMrobschilder
01/24/2023, 3:34 PMmarchalb
01/24/2023, 3:55 PMmarchalb
01/24/2023, 4:06 PMrobschilder
01/24/2023, 4:36 PMrobschilder
01/24/2023, 4:36 PMmarchalb
01/24/2023, 10:03 PMrobschilder
01/24/2023, 10:38 PMrobschilder
01/24/2023, 10:38 PMrobschilder
01/25/2023, 7:37 AMrp_st
01/25/2023, 7:45 AMrobschilder
01/25/2023, 9:22 AMmarchalb
01/25/2023, 12:31 PMrp_st
01/25/2023, 12:33 PMrobschilder
01/27/2023, 3:23 PMrp_st
01/27/2023, 3:54 PMrobschilder
02/06/2023, 5:12 PMrp_st
02/06/2023, 5:13 PMrp_st
02/06/2023, 5:13 PMrobschilder
02/06/2023, 5:13 PMrp_st
02/06/2023, 5:13 PMrobschilder
02/06/2023, 5:14 PMrobschilder
02/06/2023, 5:14 PMhttps://appleid.apple.com/auth/authorize?scope=email&response_mode=form_post&response_type=code&client_id=io.supertokens.example.service&state=819a1fd03245bb2c3d5af&redirect_uri=https%3A%2F%2Fsupertokens.io%2Fdev%2Foauth%2Fredirect-to-app
robschilder
02/06/2023, 5:14 PMhttps://appleid.apple.com/auth/authorize?scope=email&response_mode=form_post&response_type=code&client_id=apple.client.gigplan.mobile.app&redirect_uri=https%3A%2F%2Fclient.gigplan.app%2Fapi%2Fauth%2Fcallback%2Fapple&state=0f62e29cb642ea9d75d2e
I think this is where the issue is. Does this help you?robschilder
02/06/2023, 5:15 PMrp_st
02/06/2023, 5:15 PMrobschilder
02/09/2023, 7:46 AMrp_st
02/09/2023, 7:47 AMrobschilder
02/09/2023, 7:47 AMnkshah2
02/09/2023, 7:47 AMrobschilder
02/09/2023, 7:47 AMrobschilder
02/16/2023, 6:49 PMAuthorization
header instead of cookies, so caution should be exercised when using this method. (we use this now)
2. Apple login is not currently functional on mobile web, with more details available on the /temp route of the web. The Supertokens team is actively working on a solution that will allow information to be stored in the state sent to the provider, which can then be checked in the API layer to determine if it's mobile or web. Until this solution is in place, a workaround is being used that prevents iOS login from working on the web, and it should be removed from the UI until further notice.
3. Live reload is currently not functioning as expected on Capacitor when using Supertokens, and a solution is being sought to resolve this issue. To simulate this issue: uncomment the
server: {
// url: 'http://YOUR_IP:3001',
// },
from the capacitor.config.
Besides this, I think we did some amazing work and we are close to creating the starter with`npx create-supertokens-app@latest` ! 🎊🎈
For this I think we need to remove some console.logs
etc that are still in the code and maybe review the full code once more. I left them inside right now because we did not solve the caveats above here. (talking about 2 and 3)rp_st
02/17/2023, 5:50 AMnkshah2
02/17/2023, 5:53 AMrobschilder
08/15/2023, 8:11 PM14.1.3
for people to get the best security practices when working with mobile apps.nkshah2
08/16/2023, 9:32 AM