feat: Implement Apple Sign-In for Android by adding a callback function, updating redirect URI, and configuring the Android manifest.
This commit is contained in:
@@ -144,3 +144,22 @@ exports.onExpenseCreated = functions.firestore
|
||||
{ groupId: groupId }
|
||||
);
|
||||
});
|
||||
|
||||
exports.callbacks_signInWithApple = functions.https.onRequest((req, res) => {
|
||||
const code = req.body.code;
|
||||
const state = req.body.state;
|
||||
const id_token = req.body.id_token;
|
||||
const user = req.body.user;
|
||||
|
||||
const params = new URLSearchParams();
|
||||
if (code) params.append('code', code);
|
||||
if (state) params.append('state', state);
|
||||
if (id_token) params.append('id_token', id_token);
|
||||
if (user) params.append('user', user);
|
||||
|
||||
const qs = params.toString();
|
||||
const packageName = 'be.devdayronvl.travel_mate';
|
||||
const redirectUrl = `intent://callback?${qs}#Intent;package=${packageName};scheme=signinwithapple;end`;
|
||||
|
||||
res.redirect(302, redirectUrl);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user