-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat/authorization #31
Conversation
@Nelfimov review request |
добавил ветку. в ней последние изменения |
весь день разбирался с curl --request GET \
--url "https://api.github.com/user" \
--header "Accept: application/vnd.github+json" \
--header "Authorization: Bearer USER_ACCESS_TOKEN" \
--header "X-GitHub-Api-Version: 2022-11-28"
проблема не в ключе и приложении, проблема в запросе |
curl -H "Authorization: bearer TOKEN" -X POST -d " \
{ \
\"query\": \"query { viewer { login }}\" \
} \
" https://api.github.com/graphql
|
curl -H "Authorization: bearer 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" -X POST -d " \
{ \
\"query\": \"query { viewer { email }}\" \
} \
" https://api.github.com/graphql
{"data":{"viewer":{"email":"[email protected]"}}} |
@Nelfimov верской занимается Александр, проверяем авторизацию, у нас не подгружался |
app/api/github-auth-cookie/src/github-auth-cookie-handle.constants.ts
Outdated
Show resolved
Hide resolved
app/api/github-auth-cookie/src/github-auth-cookie-handle.api.ts
Outdated
Show resolved
Hide resolved
app/api/github-auth-cookie/src/github-auth-cookie-handle.api.ts
Outdated
Show resolved
Hide resolved
…ssage from queries
вот этот хук выполняется в клиентском компоненте ( app-1 | ⨯ ReferenceError: window is not defined
app-1 | at checkErrorHook (../../../../.yarn/__virtual__/@app-root-layout-virtual-ca4000c068/1/app/fragments/app-root-layout/src/check-error.hook.ts:6:33)
app-1 | at RootLayoutClient (../../../../.yarn/__virtual__/@app-root-layout-virtual-ca4000c068/1/app/fragments/app-root-layout/src/root-layout.client.tsx:20:109)
app-1 | 1 | export const checkErrorHook = () => {
app-1 | > 2 | const CURRENT_URL = new URL(window.location.href)
app-1 | | ^
app-1 | 3 | const { searchParams } = CURRENT_URL
app-1 | 4 | const errorMessage = searchParams.get('errorMessage')
app-1 | 5 | const errorCode = searchParams.get('errorCode') |
Сделай проверку на наличие Скорее всего у тебя выполняется хук до момента когда он "прогрузился" в браузере. Тебе бы туда |
все добавил |
closes #30
closes #34