Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
5.8k views
in Technique[技术] by (71.8m points)

Is it wrong to assume that Github will retain the data in the database from Android Studio?

I'm new to Android Studio.

I created an Android application where the user needs to login with the user's email and password that's already in the database.

I have never use an API, just a database.

I have uploaded it in Github and I assume that the user can log in based on the email address and password I have provided (which is already stored in the database)

I'm wondering if it's wrong to assume that? Do I need to make a registration fragment as it won't store the data in the database when the user download my source code from Github?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

See comment for more info, but essentially,

If you use a local db, and store it on github with the source code, when a user tries to log in, they will need to log in with the db creds. since the db creds are already hardcoded, you are pretty much making them irrelevant, as any user could just open the db and grab the proper creds, which means you may as well just remove the auth entirely.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...