سؤال

ما تفعله عادة في تطبيق GWT لتسجيل الدخول باستخدام OpenID هو ما يلي: giveacodicetagpre.

حيث Erturntourl هو عنوان URL الحالي الذي ترغب في إعادة توجيهه بعد التحقق. هذا يعمل بشكل جيد، إذا كان Erturntourl هو عنوان URL بسيط مثل http://mydomain.com/go/ahere

ولكن نظرا لأن التطبيق الخاص بي يعمل كدون جوجل سياقي، يتم لفه في إطار يحصل على محتوىه من وكيل Google (GoogleUserContent.com). لذلك هذا هو - معسكر مور صغير - عنوان URL داخل الإطار الذي أحب إعادة توجيه العودة إلى:

https://jtphjhg2q9h3ul31ifsbvm5hv7717h49-a-gm-opensocial.googleusercontent.com/gadgets/ifr؟url=http٪3a٪2f٪2fgorgactsgadget.appspot .com٪ 2fgorgadget٪ 2fcom.innubili.gorgacts.client.gorgadget.gadget.xml &؛ حاوية= gm وعرض= بطاقة

أثناء التسجيل OpenID، يتم إعادة توجيه المستخدم عدة مرات وإذا لم يكن ErturnTourlL غير صحيح أجزاء ترميز URL منه.

كما اكتشفت هنا ، حتى في بعض الحالات يجب أن ترمز عنوان URL المزدوج. ولكن هذه المرة أنا غير قادر على تشفير عنوان URL بشكل صحيح.

لذلك، أسئلتي:

  • هل لديك أي تلميحات يجب أن تبدو عودة OpenID- عودة إلى عنوان URL في أداة جوجل سياقية؟

  • أو ربما سؤال بسيط قليلا: هل هناك أي طريقة أخرى، يمكنني استرداد البريد الإلكتروني للمستخدم الذي قام بتسجيل الدخول الحالي في Gmail؟

هل كانت مفيدة؟

المحلول

You cannot use openId login from within a Gadget because your gadget is proxied by the gadget container. You have to open up a popup window to do the openId login and associate the opensocialId to your openId identity on the server. You have to persist the relation between openSocialId and the user identity on the server. From then on, the gadget knows its identity by requesting the relation of its opensocialId.

see also http://code.google.com/googleapps/marketplace/best_practices.html#gadget_sso

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top