Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
antkim003 committed Oct 5, 2023
2 parents 9963274 + 31d9216 commit 77a79db
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion apps/betterangels-backend/.env
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ SOCIALACCOUNT_GOOGLE_CLIENT_ID="488261458560-ign54eicotm281qll13vi7gq7ps4ga3h.ap
SOCIALACCOUNT_GOOGLE_SECRET="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"

TRUSTED_ORIGINS=http://localhost:8081
CORS_ALLOW_ALL_ORIGINS=True
CORS_ALLOW_ALL_ORIGINS=True
1 change: 1 addition & 0 deletions apps/betterangels-backend/accounts/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
SocialLoginSerializer as DjRestAuthSocialLoginSerializer,
)
from django.contrib.auth import get_user_model
from django.contrib.auth.models import User
from django.http import HttpResponseBadRequest
from django.utils.translation import gettext_lazy as _
from requests.exceptions import HTTPError
Expand Down
5 changes: 3 additions & 2 deletions apps/betterangels-backend/betterangels_backend/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@
MIDDLEWARE = [
"django.middleware.security.SecurityMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"corsheaders.middleware.CorsMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"corsheaders.middleware.CorsMiddleware",
]


Expand Down Expand Up @@ -228,4 +228,5 @@

CORS_ALLOW_CREDENTIALS = True
CSRF_TRUSTED_ORIGINS = env("TRUSTED_ORIGINS")
CORS_ALLOW_ALL_ORIGINS = env("CORS_ALLOW_ALL_ORIGINS")
# CORS_ALLOW_ALL_ORIGINS = env("CORS_ALLOW_ALL_ORIGINS")
CORS_ALLOW_ALL_ORIGINS = True
4 changes: 2 additions & 2 deletions apps/betterangels/.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
EXPO_PUBLIC_API_URL=http://localhost:8000
EXPO_PUBLIC_API_URL=http://127.0.0.1:8000
EXPO_PUBLIC_CLIENT_ID=488261458560-ign54eicotm281qll13vi7gq7ps4ga3h.apps.googleusercontent.com
EXPO_PUBLIC_REDIRECT_URL=http://localhost:8000/auth-redirect
EXPO_PUBLIC_REDIRECT_URL=http://127.0.0.1:8000/auth-redirect
5 changes: 5 additions & 0 deletions apps/betterangels/src/app/(tabs)/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ export default function TabOneScreen() {
console.log(user);
}

async function getUser() {
if (!user) return;
console.log(user);
}

return (
<View style={styles.container}>
<Text style={styles.title}>Tab One: user id: {user?.id}</Text>
Expand Down

0 comments on commit 77a79db

Please sign in to comment.