rp
08/24/2022, 10:10 AMveritas
08/24/2022, 2:46 PMsegidev
08/24/2022, 6:08 PMn1ru4l
08/25/2022, 10:32 AMnull
omitted from the token payload?rp
08/25/2022, 11:27 AMheatbr
08/25/2022, 11:58 AMclient_credentials
like alternative on login strategy ? I know there is user/password which can be use but I think have property name like clientId clientSecret it would be better.
What I want is be able to do machine2machine auth. https://auth0.com/blog/using-m2m-authorization/ this is an exampleBinouse
08/25/2022, 2:36 PMAPI_KEY: ${SUPERTOKENS_API_KEY}
to the environment section ?flixoflax
08/25/2022, 4:21 PMdongiveajack
08/25/2022, 6:44 PMLuxaaa
08/25/2022, 6:57 PMpython
def override_session_functions(oi: RecipeInterface):
original_create_new_session = oi.create_new_session
original_refresh_session = oi.refresh_session
original_get_session = oi.get_session
async def create_new_session(request, user_id, access_token_payload, session_data, user_context):
session = await original_create_new_session(request, user_id, access_token_payload, session_data, user_context)
_update_headers_in_request(request)
return session
async def refresh_session(request, user_context):
_update_headers_in_request(request)
session = await original_refresh_session(request, user_context)
_update_headers_for_response(...) # How to get response to provide it here?
return session
oi.create_new_session = create_new_session
return oi
rp
08/26/2022, 5:15 AMrp
08/26/2022, 5:18 AMengin
08/26/2022, 8:00 AMAl V
08/26/2022, 3:50 PMLuxaaa
08/26/2022, 6:24 PMpython
api = CORSMiddleware(
app=api,
allow_origins=[
"http://localhost:3000"
],
allow_credentials=True,
allow_methods=["GET", "PUT", "POST", "DELETE", "OPTIONS", "PATCH"],
allow_headers=["Content-Type", SUPERTOKENS_HEADER] + get_all_cors_headers(),
expose_headers=[SUPERTOKENS_HEADER]
)
The value for SUPERTOKENS_HEADER is x-st-cookie
but i am still using the default cookie implementaion at this time.rp
08/26/2022, 7:39 PMJustDante
08/26/2022, 8:14 PMAtoyebs
08/27/2022, 2:27 PMLuxaaa
08/27/2022, 7:30 PM...
File "/home/.../app/venv/lib/python3.9/site-packages/supertokens_python/recipe/session/api/implementation.py", line 46, in signout_post
session = await api_options.recipe_implementation.get_session(
TypeError: get_session() got an unexpected keyword argument 'anti_csrf_check'
Roy R
08/27/2022, 7:40 PMrp
08/28/2022, 5:36 AMNick White
08/28/2022, 7:04 AMNick White
08/28/2022, 7:04 AMJacobLUC
08/28/2022, 7:06 AMderptacious
08/28/2022, 12:23 PMrp
08/28/2022, 1:16 PMidanh
08/28/2022, 6:19 PMGqlExecutionContext.create(context)
and also tried injecting the session param to the resolver with
export const User = createParamDecorator(
(data: unknown, ctx: ExecutionContext) => {
const x = GqlExecutionContext.create(ctx);
const context = x.getContext();
return context.session;
},
);
with no success
and couldn't find any code example that combines graphql + nestengin
08/29/2022, 2:54 AMBinouse
08/29/2022, 10:26 AMn1ru4l
08/29/2022, 10:54 AMsub
) for the google provider was google-oauth2|<ID>
.
Now with supertokens I am building this within createNewSession
, for mapping the accounts.
const externalUserId = user.thirdParty ? `${user.thirdParty.id}|${user.thirdParty.userId}` : null;
I noticed that user.thirdParty.id
, here is google
and not google-oauth2
. Is it safe for me to simply replace the google|
part with google-oauth2
, is the <ID>
part of the auth0 sub stable?n1ru4l
08/29/2022, 10:54 AMsub
) for the google provider was google-oauth2|<ID>
.
Now with supertokens I am building this within createNewSession
, for mapping the accounts.
const externalUserId = user.thirdParty ? `${user.thirdParty.id}|${user.thirdParty.userId}` : null;
I noticed that user.thirdParty.id
, here is google
and not google-oauth2
. Is it safe for me to simply replace the google|
part with google-oauth2
, is the <ID>
part of the auth0 sub stable?