openmobilehub / react-native-omh-auth

https://openmobilehub.github.io/react-native-omh-auth/
Apache License 2.0
0 stars 0 forks source link

Align Environmental Variable Names Across React Native and Android Native #39

Closed dzuluaga closed 1 month ago

dzuluaga commented 1 month ago

Hello Kacper,

I noticed a discrepancy in the naming conventions of environmental variables used in our React Native and Android Native projects. This inconsistency can lead to confusion for developers who work across these platforms. I propose aligning the naming conventions with those used in our Android Native project to maintain consistency and reduce potential errors.

Repositories Affected

Current Naming Conventions

React Native

GOOGLE_CLIENT_ID=
FACEBOOK_APP_ID=
FACEBOOK_APP_SECRET=
MICROSOFT_CLIENT_ID=
DROPBOX_CLIENT_ID=
DROPBOX_CLIENT_SECRET=

Android Native

echo "GOOGLE_CLIENT_ID=$1" >> ./local.properties
echo "FACEBOOK_APP_ID=$2" >> ./local.properties
echo "FACEBOOK_CLIENT_TOKEN=$3" >> ./local.properties
echo "MICROSOFT_CLIENT_ID=$4" >> ./local.properties
echo "MICROSOFT_SIGNATURE_HASH=$5" >> ./local.properties
echo "DROPBOX_APP_KEY=$6" >> ./local.properties

Suggested Changes

Align the naming conventions in the React Native project with those used in the Android Native project:

Expected Benefits

Next Steps

Awaiting feedback on this proposal from the team. If agreed, we will proceed with updating the environmental variables in the React Native project accordingly.

Thank you for considering this change to improve our project consistency.

andrei-zgirvaci commented 1 month ago

Hey @dzuluaga, thanks for bringing this to our attention!

For React Native library we decided to stick with the following conventions: PROVIDER_CLIENT_ID & PROVIDER_CLIENT_SECRET. We believe this ensures that all providers follow a similar naming while also following the react-native-app-auth configuration. Moreover, we have added improvements in https://github.com/openmobilehub/react-native-omh-auth/pull/45/commits/c108c39e4534cba640819547b91c62c16f3e1f82 to the documentation of each provider to reflect their own naming conventions.

We have also corrected the .env.sample secrets for Facebook in https://github.com/openmobilehub/react-native-omh-auth/pull/45/commits/245383ffb5b7f79b7d44bcef670691a2b9bf9ba8.